S变换matlab实现
S变换函数
function [st,t,f] = st(timeseries,minfreq,maxfreq,samplingrate,freqsamplingrate)
% S变换
% Code by huasir @Beijing 2025.1.10
% Reference is "Localization of the Complex Spectrum: The S Transform"
% from IEEE Transactions on Signal Processing, vol. 44., number 4, April 1996, pages 998-1001.
%% 函数的输出和输出
% Input
% * timeseries: 待进行S变换的信号向量
% * minfreq: 时频分布结果中的最小频率,对应频率轴的最小值(默认值为0)
% * maxfreq: 时频分布结果中的最大频率,对应频率轴的最大值(默认值为奈奎斯特频率)
% * samplingrate: 两个采样点之间的采样时间间隔(默认为1)
% * freqsamplingrate:频率分辨率(默认为1)
% Output
% * st: Stockwell变换的结果,行对应频率,列对应时刻,
% * t: 包含采样时刻的时间向量
% * f: 频率向量
%% 以下参数可按需调整
% * [verbose]: 如果为真,则打印函数运行中所有的提示信息
% * [removeedge]:如果为真,则删除最小二乘拟合的抛物线,并在时间序列的边缘放置一个5%的hanning锥
% 通常情况下,这是个不错的选择。
% * [analytic_signal]: 如果时间序列是实数值,则取它的解析信号并进行S变换
% * [factor]: 局部化高斯的宽度因子,例如,一个周期为10s的正弦信号具有宽度因子*10s的高斯窗口。
% 通常使用的因子为1,有些情况下为了得到更好的频率分辨率,可以采用3。
% *****All frequencies in (cycles/(time unit))!******
% Copyright (c) by huasir
% $Revision: 1.0 $ $Date: 2025/01/10 $
% 这是保存函数默认值的S变换封装器
TRUE = 1;
FALSE = 0;
%%% 默认参数 [有特殊需求的情况下进行更改]
verbose = TRUE;
removeedge= FALSE;
analytic_signal = FALSE;
factor = 1;
%%% 默认参数设置结果
%% 开始进行输入变量检查
% 首先确保输入的时间序列是有效值,否则,返回帮助信息
if verbose disp(' '),end % i like a line left blank if nargin == 0 % nargin为输入参数的个数,nargin=0,表示无输入if verbose disp('No parameters inputted.'),end st_help t=0;,st=-1;,f=0; return
end % 如果输入数据为行向量的话,将它调整为列向量
if size(timeseries,2) > size(timeseries,1) timeseries=timeseries';
end % 确保输入数据为1维向量,而不是矩阵
if size(timeseries,2) > 1 error('Please enter a *vector* of data, not matrix') return
elseif (size(timeseries)==[1 1]) == 1 error('Please enter a *vector* of data, not a scalar') return
end % 输入变量不全的情况下采用默认值if nargin == 1 %只有1个输入变量minfreq = 0; maxfreq = fix(length(timeseries)/2); samplingrate=1; freqsamplingrate=1;
elseif nargin==2 %2个输入变量maxfreq = fix(length(timeseries)/2); samplingrate=1; freqsamplingrate=1; [ minfreq,maxfreq,samplingrate,freqsamplingrate] = check_input(minfreq,maxfreq,samplingrate,freqsamplingrate,verbose,timeseries);
elseif nargin==3 samplingrate=1; freqsamplingrate=1; [ minfreq,maxfreq,samplingrate,freqsamplingrate] = check_input(minfreq,maxfreq,samplingrate,freqsamplingrate,verbose,timeseries);
elseif nargin==4 freqsamplingrate=1; [ minfreq,maxfreq,samplingrate,freqsamplingrate] = check_input(minfreq,maxfreq,samplingrate,freqsamplingrate,verbose,timeseries);
elseif nargin == 5 [ minfreq,maxfreq,samplingrate,freqsamplingrate] = check_input(minfreq,maxfreq,samplingrate,freqsamplingrate,verbose,timeseries);
else if verbose disp('Error in input arguments: using defaults'),end minfreq = 0; maxfreq = fix(length(timeseries)/2); samplingrate=1; freqsamplingrate=1;
end
if verbose disp(sprintf('Minfreq = %d',minfreq)) disp(sprintf('Maxfreq = %d',maxfreq)) disp(sprintf('Sampling Rate (time domain) = %d',samplingrate)) disp(sprintf('Sampling Rate (freq. domain) = %d',freqsamplingrate)) disp(sprintf('The length of the timeseries is %d points',length(timeseries))) disp(' ')
end
%END OF INPUT VARIABLE CHECK % If you want to "hardwire" minfreq & maxfreq & samplingrate & freqsamplingrate do it here % calculate the sampled time and frequency values from the two sampling rates
t = (0:length(timeseries)-1)*samplingrate;
spe_nelements =ceil((maxfreq - minfreq+1)/freqsamplingrate) ;
f = (minfreq + [0:spe_nelements-1]*freqsamplingrate)/(samplingrate*length(timeseries));
if verbose disp(sprintf('The number of frequency voices is %d',spe_nelements)),end % The actual S Transform function is here:
st = strans(timeseries,minfreq,maxfreq,samplingrate,freqsamplingrate,verbose,removeedge,analytic_signal,factor);
% this function is below, thus nicely encapsulated %WRITE switch statement on nargout
% if 0 then plot amplitude spectrum
if nargout==0 if verbose disp('Plotting pseudocolor image'),end pcolor(t,f,abs(st))
end return %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function st = strans(timeseries,minfreq,maxfreq,samplingrate,freqsamplingrate,verbose,removeedge,analytic_signal,factor);
% Returns the Stockwell Transform, STOutput, of the time-series
% Code by R.G. Stockwell.
% Reference is "Localization of the Complex Spectrum: The S Transform"
% from IEEE Transactions on Signal Processing, vol. 44., number 4,
% April 1996, pages 998-1001.
%
%-------Inputs Returned------------------------------------------------
% - are all taken care of in the wrapper function above
%
%-------Outputs Returned------------------------------------------------
%
% ST -a complex matrix containing the Stockwell transform.
% The rows of STOutput are the frequencies and the
% columns are the time values
%
%
%----------------------------------------------------------------------- % Compute the length of the data.
n=length(timeseries);
original = timeseries;
if removeedge if verbose disp('Removing trend with polynomial fit'),end ind = [0:n-1]'; r = polyfit(ind,timeseries,2); fit = polyval(r,ind) ; timeseries = timeseries - fit; if verbose disp('Removing edges with 5% hanning taper'),end sh_len = floor(length(timeseries)/10); wn = hanning(sh_len); if(sh_len==0) sh_len=length(timeseries); wn = 1&[1:sh_len]; end % make sure wn is a column vector, because timeseries is if size(wn,2) > size(wn,1) wn=wn'; end timeseries(1:floor(sh_len/2),1) = timeseries(1:floor(sh_len/2),1).*wn(1:floor(sh_len/2),1); timeseries(length(timeseries)-floor(sh_len/2):n,1) = timeseries(length(timeseries)-floor(sh_len/2):n,1).*wn(sh_len-floor(sh_len/2):sh_len,1); end % If vector is real, do the analytic signal if analytic_signal if verbose disp('Calculating analytic signal (using Hilbert transform)'),end % this version of the hilbert transform is different than hilbert.m % This is correct! ts_spe = fft(real(timeseries)); h = [1; 2*ones(fix((n-1)/2),1); ones(1-rem(n,2),1); zeros(fix((n-1)/2),1)]; ts_spe(:) = ts_spe.*h(:); timeseries = ifft(ts_spe);
end % Compute FFT's
tic;vector_fft=fft(timeseries);tim_est=toc;
vector_fft=[vector_fft,vector_fft];
tim_est = tim_est*ceil((maxfreq - minfreq+1)/freqsamplingrate) ;
if verbose disp(sprintf('Estimated time is %f',tim_est)),end % Preallocate the STOutput matrix
st=zeros(ceil((maxfreq - minfreq+1)/freqsamplingrate),n);
% Compute the mean
% Compute S-transform value for 1 ... ceil(n/2+1)-1 frequency points
if verbose disp('Calculating S transform...'),end
if minfreq == 0 st(1,:) = mean(timeseries)*(1&[1:1:n]);
else st(1,:)=ifft(vector_fft(minfreq+1:minfreq+n).*g_window(n,minfreq,factor));
end %the actual calculation of the ST
% Start loop to increment the frequency point
for banana=freqsamplingrate:freqsamplingrate:(maxfreq-minfreq) st(banana/freqsamplingrate+1,:)=ifft(vector_fft(minfreq+banana+1:minfreq+banana+n).*g_window(n,minfreq+banana,factor));
end % a fruit loop! aaaaa ha ha ha ha ha ha ha ha ha ha
% End loop to increment the frequency point
if verbose disp('Finished Calculation'),end %%% end strans function %------------------------------------------------------------------------
function gauss=g_window(length,freq,factor) % Function to compute the Gaussion window for
% function Stransform. g_window is used by function
% Stransform. Programmed by Eric Tittley
%
%-----Inputs Needed--------------------------
%
% length-the length of the Gaussian window
%
% freq-the frequency at which to evaluate
% the window.
% factor- the window-width factor
%
%-----Outputs Returned--------------------------
%
% gauss-The Gaussian window
% vector(1,:)=[0:length-1];
vector(2,:)=[-length:-1];
vector=vector.^2;
vector=vector*(-factor*2*pi^2/freq^2);
% Compute the Gaussion window
gauss=sum(exp(vector)); %----------------------------------------------------------------------- %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^%
function [ minfreq,maxfreq,samplingrate,freqsamplingrate] = check_input(minfreq,maxfreq,samplingrate,freqsamplingrate,verbose,timeseries)
% this checks numbers, and replaces them with defaults if invalid % if the parameters are passed as an array, put them into the appropriate variables
s = size(minfreq);
l = max(s);
if l > 1 if verbose disp('Array of inputs accepted.'),end temp=minfreq; minfreq = temp(1);; if l > 1 maxfreq = temp(2);,end; if l > 2 samplingrate = temp(3);,end; if l > 3 freqsamplingrate = temp(4);,end; if l > 4 if verbose disp('Ignoring extra input parameters.'),end end; end if minfreq < 0 | minfreq > fix(length(timeseries)/2); minfreq = 0; if verbose disp('Minfreq < 0 or > Nyquist. Setting minfreq = 0.'),end end if maxfreq > length(timeseries)/2 | maxfreq < 0 maxfreq = fix(length(timeseries)/2); if verbose disp(sprintf('Maxfreq < 0 or > Nyquist. Setting maxfreq = %d',maxfreq)),end end if minfreq > maxfreq temporary = minfreq; minfreq = maxfreq; maxfreq = temporary; clear temporary; if verbose disp('Swapping maxfreq <=> minfreq.'),end end if samplingrate <0 samplingrate = abs(samplingrate); if verbose disp('Samplingrate <0. Setting samplingrate to its absolute value.'),end end if freqsamplingrate < 0 % check 'what if freqsamplingrate > maxfreq - minfreq' case freqsamplingrate = abs(freqsamplingrate); if verbose disp('Frequency Samplingrate negative, taking absolute value'),end end % bloody odd how you don't end a function %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^%
function st_help
disp(' ')
disp('st() HELP COMMAND')
disp('st() returns - 1 or an error message if it fails')
disp('USAGE:: [localspectra,timevector,freqvector] = st(timeseries)')
disp('NOTE:: The function st() sets default parameters then calls the function strans()')
disp(' ')
disp('You can call strans() directly and pass the following parameters')
disp(' **** Warning! These inputs are not checked if strans() is called directly!! ****')
disp('USAGE:: localspectra = strans(timeseries,minfreq,maxfreq,samplingrate,freqsamplingrate,verbose,removeedge,analytic_signal,factor) ')disp(' ')
disp('Default parameters (available in st.m)')
disp('VERBOSE - prints out informational messages throughout the function.')
disp('REMOVEEDGE - removes the edge with a 5% taper, and takes')
disp('FACTOR - the width factor of the localizing gaussian')
disp(' ie, a sinusoid of period 10 seconds has a ')
disp(' gaussian window of width factor*10 seconds.')
disp(' I usually use factor=1, but sometimes factor = 3')
disp(' to get better frequency resolution.')
disp(' ')
disp('Default input variables')
disp('MINFREQ - the lowest frequency in the ST result(Default=0)')
disp('MAXFREQ - the highest frequency in the ST result (Default=nyquist')
disp('SAMPLINGRATE - the time interval between successive data points (Default = 1)')
disp('FREQSAMPLINGRATE - the number of frequencies between samples in the ST results')
% end of st_help procedure
S逆变换函数
function [ts] = inverse_st(st)
% Returns the inverse of the Stockwell Transform of the REAL_VALUED timeseries.
% Reference is "Localization of the Complex Spectrum: The S Transform"
% from IEEE Transactions on Signal Processing, vol. 44., number 4, April 1996, pages 998-1001.
%
%-------Inputs Needed------------------------------------------------
%
% S-Transform matrix created by the st.m function
%-------Optional Inputs ------------------------------------------------
% none
%-------Outputs Returned------------------------------------------------
%
% ts -a REAL-VALUED time series
%--------Additional details----------------------- % sum over time to create the FFT spectrum for the positive frequencies
stspe = sum(st,2); % get st matrix dimensions
[nfreq,ntimes] = size(st);
if rem(ntimes ,2) ~= 0 % odd number of points, so nyquist point is not aliased, so concatenate % the reversed spectrum to create the negative frequencies % drop the DC value negspe = fliplr(stspe(2:nfreq)');
else % even number of points % therefore drop the first point (DC) and the last point (aliased nyqusit freq) negspe = fliplr(stspe(2:nfreq-1)');
end % using symmetry of FFT spectrum of a real signal, recreate the negative frequencies from the positie frequencies fullstspe = [conj(stspe') negspe]; % the time series is the inverse fft of this
ts = ifft(fullstspe);
% and take the real part, the imaginary part will be zero.
ts = real(ts);
相关文章:
![](https://www.ngui.cc/images/no-images.jpg)
S变换matlab实现
S变换函数 function [st,t,f] st(timeseries,minfreq,maxfreq,samplingrate,freqsamplingrate) % S变换 % Code by huasir Beijing 2025.1.10 % Reference is "Localization of the Complex Spectrum: The S Transform" % from IEEE Transactions on Signal Proc…...
![](https://i-blog.csdnimg.cn/direct/5eed63a0ddae4fe999c40752b5d78623.png)
Springboot——钉钉(站内)实现登录第三方应用
文章目录 前言准备1、创建钉钉应用,并开放网页应用2、配置网页应用各项参数发布版本 前端改造后端逻辑1、获取应用免登录 Access_token2、通过免登录 Access_token 和 Auth_Code 获取对应登录人信息 注意事项 前言 PC端的钉钉中工作台,增加第三方应用&a…...
![](https://i-blog.csdnimg.cn/img_convert/3ef0b3d2e518d98ab54c273c67b50d5e.png)
基于深度学习算法的AI图像视觉检测
基于人工智能和深度学习方法的现代计算机视觉技术在过去10年里取得了显著进展。如今,它被广泛用于图像分类、人脸识别、图像中物体的识别等。那么什么是深度学习?深度学习是如何应用在视觉检测上的呢? 什么是深度学习? 深度学习是…...
![](https://www.ngui.cc/images/no-images.jpg)
cJson——序列化格式json和protobuf对比
cJson——序列化格式json和protobuf对比 1. 更小的消息体积2. 更快的序列化与反序列化速度3. 类型安全4. 向后和向前兼容性5. 更低的带宽消耗6. 高效的编码方式7. 易于跨语言支持8. 支持复杂的数据结构9. 更好的支持大型数据交换总结 Protocol Buffers (Protobuf) 和 JSON 都是…...
![](https://www.ngui.cc/images/no-images.jpg)
搭建一个fastapi的项目,调用ollama服务
1. 项目结构 my_project/ │ ├── app/ │ ├── main.py # FastAPI应用的入口 │ ├── services/ # 包含服务逻辑 │ │ └── ollama_service.py │ ├── models/ # 定义数据模型 │ │ └── response.py │ ├─…...
![](https://www.ngui.cc/images/no-images.jpg)
Wireshark编译手册(Windows)
以下是对 Wireshark 官方文档中“Windows 平台的设置和构建说明”部分的翻译和总结: 2.2. Windows 平台 本节提供了在 Windows 上进行 Wireshark 开发的快速设置指南,包含推荐的配置。 2.2.1. 使用 Microsoft Visual Studio 注意:除非您非…...
![](https://www.ngui.cc/images/no-images.jpg)
在高德地图上加载3DTilesLayer图层模型/天地瓦片
1. 引入必要的库 Three.js:一个用于创建和显示3D图形的JavaScript库。vuemap/three-layer:一个Vue插件,它允许你在高德地图中添加Three.js图层。vuemap/layer-3dtiles:一个用于处理3D Tiles格式数据的Vue插件,可以用来…...
![](https://i-blog.csdnimg.cn/direct/c3316060c4174e568df5d076c0f005c7.png)
深入浅出负载均衡:理解其原理并选择最适合你的实现方式
负载均衡是一种在多个计算资源(如服务器、CPU核心、网络链接等)之间分配工作负载的技术,旨在优化资源利用率、提高系统吞吐量和降低响应时间。负载均衡的实现方式多种多样,以下是几种常见的实现方式: 1. 硬件负载均衡&…...
![](https://www.ngui.cc/images/no-images.jpg)
STM32的存储结构
STM32F103 芯片是基于 ARM Cortex-M3 内核的微控制器,它集成了多种类型的存储器,每种存储器都有其特定的作用和存储对象。以下是关于 STM32F103 中 Flash、ROM 和 SRAM 的详细介绍: 1. Flash Memory (闪存) 作用:Flash 是非易失性…...
![](https://www.ngui.cc/images/no-images.jpg)
@SneakyThrows 注解详解
SneakyThrows 注解详解 1. 基本介绍 SneakyThrows 是 Lombok 提供的注解,用于简化异常处理,自动生成 try-catch 代码块,将检查型异常转换为非检查型异常。 2. 使用对比 2.1 传统写法 public String readFile(String path) {try {return …...
![](https://www.ngui.cc/images/no-images.jpg)
js监测页面可见性
监测切换页面 检测页面的可见性状态document.visibilityState:document.hiddenvisibilitychange 事件 js 检测页面切换至别的应用 检测页面的可见性状态 在JavaScript中,你可以使用Page Visibility API来检测页面的可见性状态。这个API提供了一组接口,允…...
![](https://i-blog.csdnimg.cn/img_convert/687db09453752352bea886c1a5f707a9.png)
Android wifi常见问题及分析
参考 Android Network/WiFi 那些事儿 前言 本文将讨论几个有意思的网络问题,同时介绍 Android 上常见WiFi 问题的分析思路。 网络基础Q & A 一. 网络分层缘由 分层想必大家很熟悉,是否想过为何需要这样分层? 网上大多都是介绍每一层…...
![](https://www.ngui.cc/images/no-images.jpg)
EFCore HasDefaultValueSql
今天小伙伴在代码中遇到了有关 HasDefaultValue 的疑问,这里整理澄清下... 在使用 Entity Framework Core (EFCore) 配置实体时,HasDefaultValue 方法会为数据库列设置一个默认值。该默认值的行为取决于以下条件: 1. 配置 HasDefaultValue 的…...
![](https://i-blog.csdnimg.cn/direct/302bcb33d0f742bbb764862a2a7eef6a.png)
Win10微调大语言模型ChatGLM2-6B
在《Win10本地部署大语言模型ChatGLM2-6B-CSDN博客》基础上进行,官方文档在这里,参考了这篇文章 首先确保ChatGLM2-6B下的有ptuning AdvertiseGen下载地址1,地址2,文件中数据留几行 模型文件下载地址 (注意࿱…...
![](https://www.ngui.cc/images/no-images.jpg)
什么叫区块链?怎么保证区块链的安全性?
区块链(Blockchain)是一种分布式数据库或账本技术,它通过去中心化的方式记录交易或其他数据,并确保这些记录是安全、透明和不可篡改的。区块链最初是作为比特币(Bitcoin)加密货币的基础技术而被公众所知&am…...
![](https://www.ngui.cc/images/no-images.jpg)
一、智能体强化学习——强化学习基础
1.1 强化学习与深度学习的基本概念 1.1.1 强化学习的核心思想 什么是强化学习? 强化学习(Reinforcement Learning, RL):指在与环境(Environment)的反复交互中,智能体(Agent&#x…...
![](https://i-blog.csdnimg.cn/direct/2a8dfdd0108d46cebd0f973744e2999d.png#pic_center)
【DES加密】
什么是DES DES(Data Encryption Standard) 是一种对称加密算法。它的设计目标是提供高度的数据安全性和性能。 DES的概念 DES使用56位的密钥和64位的明文块进行加密。DES算法的分组大小是64位,因此,如果需要加密的明文长度不足64位,需要进…...
![](https://www.ngui.cc/images/no-images.jpg)
.NET中的框架和运行环境
在.NET生态系统中,框架和运行环境是两个不同的概念,它们各自扮演着重要的角色。 下面我将分别介绍.NET中的框架和运行环境,并解释它们之间的区别。 .NET 框架(Frameworks) 框架提供了一套预定义的类库、工具和服务&…...
![](https://www.ngui.cc/images/no-images.jpg)
探索微软 M365 安全:全方位守护数字世界
在当今这个科技呈井喷式飞速发展,数字化浪潮以汹涌澎湃、锐不可当之势席卷全球的时代,企业与个人仿若置身于一片浩瀚无垠、信息奔涌的海洋之中,尽情畅享着技术革新所带来的无穷无尽便利。然而,恰如平静海面下潜藏着暗礁与汹涌暗流,网络安全问题恰似隐匿在暗处、随时可能给…...
![](https://www.ngui.cc/images/no-images.jpg)
深入探索AI核心模型:CNN、RNN、GAN与Transformer
在人工智能的飞速发展中,众多深度学习模型和算法不断涌现,推动了许多领域的进步。特别是在图像识别、自然语言处理、生成建模等方向,AI模型的应用越来越广泛。本文将介绍几种最常用的AI模型,包括卷积神经网络(CNN&…...
![](https://i-blog.csdnimg.cn/direct/0a15fd8c8e9d4d62953e7f740746b71a.png#pic_center)
Java - Http 通讯
Java - Http 通讯 PS: 1. Http 协议 POST | GET 请求; 2. 支持 报头、报文、参数 自定义配置; 3. GET 返回支持 String | Stream; 4. 相关依赖: <dependency><groupId>org.apache.httpcomponents</groupId><…...
![](https://i-blog.csdnimg.cn/direct/6bf681c38fc74869930d29b4c3f9d94f.png)
C++ Qt练习项目 QChar功能测试
个人学习笔记 代码仓库 GitCode - 全球开发者的开源社区,开源代码托管平台 新建项目 设计UI 1、拖入group box去掉名字 2、拖入2个LineEdit 3、拖入两个Label 4、拖入两个PushButton 5、点栅格布局 1、拖入GroupBox 2、拖入4个PushButton 3、点栅格布局 1、拖入GroupBo…...
![](https://i-blog.csdnimg.cn/direct/72659ce75e944a10adbf38eff8e97e56.png)
android 官网刷机和线刷
nexus、pixel可使用google官网线上刷机的方法。网址:https://flash.android.com/ 本文使用google线上刷机,将Android14 刷为Android12 以下是失败的线刷经历。 准备工作 下载升级包。https://developers.google.com/android/images?hlzh-cn 注意&…...
![](https://i-blog.csdnimg.cn/img_convert/db78e95aa0b534289958dcd77ed7dc4c.jpeg)
二叉树层序遍历 Leetcode102.二叉树的层序遍历
二叉树的层序遍历相当于图论的广度优先搜索,用队列来实现 (二叉树的递归遍历相当于图论的深度优先搜索) 102.二叉树的层序遍历 给你二叉树的根节点 root ,返回其节点值的 层序遍历 。 (即逐层地,从左到右…...
![](https://i-blog.csdnimg.cn/direct/9b8d77a1206e4edf88929506db3b3d54.png)
DELTA并联机械手视觉方案荣获2024年度机器人应用典型案例奖
直击现场 2025年1月9日晚,2024深圳市机器人年度评选颁奖典礼在深圳市南山区圣淘沙酒店正式拉开帷幕。本次颁奖活动由中国科学院深圳先进技术研究院指导,深圳市机器人协会与《机器人与智能系统》杂志组织承办。 正运动公司受邀参与此次典礼,…...
![](https://i-blog.csdnimg.cn/img_convert/bf793a045b8df2ba32dbb345d3009e6e.png)
Netty 入门学习
前言 学习Spark源码绕不开通信,Spark通信是基于Netty实现的,所以先简单学习总结一下Netty。 Spark 通信历史 最开始: Akka Spark 1.3: 开始引入Netty,为了解决大块数据(如Shuffle)的传输问题 Spark 1.6&…...
![](https://i-blog.csdnimg.cn/img_convert/3278a0e3de20d9b4ba4e641dc0793c29.png)
Magentic-One、AutoGen、LangGraph、CrewAI 或 OpenAI Swarm:哪种多 AI 代理框架最好?
目录 一、说明 二、 AutoGen-自动生成(微软) 2.1 特征 2.2 局限性 三、 CrewAI 3.1 特征 3.2 限制: 四、LangGraph 4.1 特征: 4.2 限制: 五、OpenAI Swarm 5.1 特征 5.2 限制 六、Magentic-One 6.1 特征 6.2 限制 七、…...
![](https://www.ngui.cc/images/no-images.jpg)
openstack下如何生成centos9 centos10 和Ubuntu24 镜像
如何生成一个centos 10和centos 9 的镜像1. 下载 对应的版本 wget https://cloud.centos.org/centos/10-stream/x86_64/images/CentOS-Stream-GenericCloud-x86_64-10-latest.x86_64.qcow2 wget https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-Gener…...
![](https://www.ngui.cc/images/no-images.jpg)
Kivy App开发之UX控件Slider滑块
在app中可能会调节如音量,亮度等,可以使用Slider来实现,该控件调用方便,兼容性好,滑动平稳。在一些参数设置中,也可以用来调整数值。 支持水平和垂直方向,可以设置默认值,最小及最大值。 使用方法,需用引入Slider类,通过Slider类生成一个滑块并设置相关的样式后,再…...
![](https://i-blog.csdnimg.cn/direct/e12caac3ba524fd29aca0316906f9d44.png)
CSS——22.静态伪类(伪类是选择不同元素状态)
<!DOCTYPE html> <html><head><meta charset"UTF-8"><title>静态伪类</title> </head><body><a href"#">我爱学习</a></body> </html>单击链接前的样式 左键单击(且…...
![](/images/no-images.jpg)
成都旅游网站建设/b2b平台都有哪些网站
转自:http://www.cnblogs.com/mingxuan 六种异常处理的陋习 你觉得自己是一个Java专家吗?是否肯定自己已经全面掌握了Java的异常处理机制?在下面这段代码中,你能够迅速找出异常处理的六个问题吗 1 OutputStreamWriter out ... 2 …...
帮人做网站被派出所抓到徐州/阿里巴巴怎么优化关键词排名
1.要在andorid中实现网络图片查看,涉及到用户隐私问题,所以要在AndroidManifest.xml中添加访问网络权限 <uses-permission android:name"android.permission.INTERNET"/> 2.布局文件 <LinearLayout xmlns:android"http://schem…...
![](/images/no-images.jpg)
企业网站必须做可信认证吗/三亚百度推广地址
本文实例为大家分享了java封装前端查询条件的具体代码,供大家参考,具体内容如下import hengyi.oa.mobile.exception.ServiceException;import java.io.UnsupportedEncodingException;import java.util.List;import java.util.Map;import java.util.Map.E…...
![](https://images2015.cnblogs.com/blog/10220/201603/10220-20160329001837660-1522961668.png)
霍山县网站建设公司/软文有哪些
【示例一】回家过春节 原理 使用继承,子类中不需要实现那些重复的订票和庆祝团圆的代码了,避免了代码的重复;子类实现了不同方式的回家方法,把它栓入(hook)到父类中去,实现了完整的回家过年的逻…...
![](/images/no-images.jpg)
wordpress设置文件大小/百度地图在线使用
ASP.NET MVC的页面跳转 当我们在使用ASP.NET MVC实现页面跳转的时候,常用的应该是: RedirectRedirectToActionRedirectToRoute或者在前台使用脚本跳转。 但这几种跳转方式都是基于Get请求的,在某些特定场景下可能并不适用。例如需要传递大数据…...
![](/images/no-images.jpg)
西安网站 技术支持牛商网/网络策划
1、建立FontLibrary.fla文件,在其文档类FontLibrary.as中写如下代码: package { import flash.text.Font; public class FontLibrary extends Sprite { [Embed(systemFont"华文中宋", fontName"MyFont", unico…...