-
LZW的算法实现
LZW算法的实现
LZW算法 其中 几个对象为 编码流 数据流 以及 编译表
字符即为数值,这里0-255
字符串:几个字符组成的串。这里可以简单用 来描述。其中前缀可以为0。
根:长度为1的字符串。
编码(Code):按照固定的长度从编码流中读取的值,即编译表中映射值。即一个编码对应一个字符串
本程序中将定义编码长度最大为12。最小为8。
本实现中自动根据文件内容生成对应的编译表
一个编码对应一个字符串,
字符串匹配通过hash算法去编译表中查找对应的编码。
hash值 = (前缀的编码+后缀编码)%常数
- 2022-10-19 02:30:04下载
- 积分:1
-
kmeans算法
harris角点检测源代码,简洁高效,通俗易懂,可以有效检测出图像的角点,并提供了一个画圆的程序,用于在图像上圈出角点。 使用格式为[cnt,posr,posc] = get_harris(img,k,t) 其中img为需要检测的图像,k,t分别为该角点检测
- 2022-03-02 21:18:53下载
- 积分:1
-
迭代法阈值分割
图像阈值分割---迭代算法
1.处理流程:
1.为全局阈值选择一个初始估计值T(图像的平均灰度)。
2.用T分割图像。产生两组像素:G1有灰度值大于T的像素组成,G2有小于等于T像素组成。
3.计算G1和G2像素的平均灰度值m1和m2;
4.计算一个新的阈值:T = (m1 + m2) / 2;
5.重复步骤2和4,直到连续迭代中的T值间的差小于一个预定义参数为止。
&
- 2023-02-13 16:40:03下载
- 积分:1
-
我用MATLAB编写的傅里叶变换,不利用FF软件…
采用Matlab自己编写的傅里叶变换,并不是使用软件提供的FFT2-I have written using Matlab Fourier transform, not using software provided by FFT2
- 2022-03-02 17:36:01下载
- 积分:1
-
!
2 ! HOMPACK90 is a suite of FORTRAN 90 subroutines for solving nonline...
!
2 ! HOMPACK90 is a suite of FORTRAN 90 subroutines for solving nonlinear
3 ! systems of equations by homotopy methods. There are subroutines for
4 ! fixed point, zero finding, and general homotopy curve tracking problems,
5 ! utilizing both dense and sparse Jacobian matrices, and implementing
6 ! three different algorithms: ODE-based, normal flow, and augmented
7 ! Jacobian. The (driver) subroutines called by the user are given in the
8 ! table below, and are well documented internally. The user need not
9 ! be concerned with any other subroutines in HOMPACK90.
-!
2 ! HOMPACK90 is a suite of FORTRAN 90 subroutines for solving nonlinear
3 ! systems of equations by homotopy methods. There are subroutines for
4 ! fixed point, zero finding, and general homotopy curve tracking problems,
5 ! utilizing both dense and sparse Jacobian matrices, and implementing
6 ! three different algorithms: ODE-based, normal flow, and augmented
7 ! Jac
- 2022-07-21 06:18:17下载
- 积分:1
-
正整数x 的约数是能整除x 的正整数。正整数x 的约数个数记为div(x)。例如,1,2,5,10 都是正整数10 的约数,且div(10)=4。设a 和b 是...
正整数x 的约数是能整除x 的正整数。正整数x 的约数个数记为div(x)。例如,1,2,5,10 都是正整数10 的约数,且div(10)=4。设a 和b 是2 个正整数,a≤b,找出a 和b之间约数个数最多的数x。
对于给定的2 个正整数a≤b,编程计算a 和b 之间约数个数最多的数。
数据输入
输入数据由文件名为input.txt的文本文件提供。文件的第1 行有2 个正整数a和b。
结果输出
程序运行结束时,若找到的a 和b 之间约数个数最多的数是x,将div(x)输出到文件output.txt中。
输入文件示例 输出文件示例
input.txt output.txt
1 36 9
-Positive integer x can be about a few of the positive integer x divisible. Positive integer x the approximate number recorded as the number of div (x). For example, 1,2,5,10 are about 10 positive integer number, and div (10) = 4. Set a and b are two positive integers, a ≤ b, to find a and b between about a few number of the largest number of x. For a given two positive integers a ≤ b, Programming calculated a and b between about a few number of the largest number. Data entry input data from the document text file named input.txt provide. File line 1 has two positive integers a and b. The results run the end of the output, if found between a and b of about a few number o
- 2023-04-13 05:20:03下载
- 积分:1
-
示范代码平衡二叉树的实现,并使用了…
本代码演示了平衡排序二叉树的实现,并用到了智能指针等技术-demonstration of the code balanced binary tree in order to achieve, and used an intelligent guide technology
- 2023-03-05 01:20:04下载
- 积分:1
-
fast Ica matlab算法,经过试验验证了,希望对大家有用处
fast Ica matlab算法,经过试验验证了,希望对大家有用处-fast algorithm, the test after test, we hope to be useful
- 2023-07-30 05:00:03下载
- 积分:1
-
Matrix的实例
Matrix的实例-Matrix
- 2022-04-01 02:13:52下载
- 积分:1
-
C语言验证歌德巴赫猜想
C语言验证歌德巴赫猜想-C language test Goldbach conjecture
- 2022-07-21 01:02:04下载
- 积分:1