-
最优二叉查找树
C[i,j] 表示点i+1,i+2到点j中,选择任意一个点作为根,在(j-i)个解中找出成本最小的最优解
向前递推过程:
首先计算所有j-i=1的C(i, j)
然后依次计算j-i=2,3,…,n的C(i,j)。
C(0,n)=最优二分检索树的成本。
初始值
C(i,i) = 0
W(i,i) = Q(i),0≤i≤n
最优二分检索树的构造
在计算C(i, j)的过程中,记下使之取得最小值的k值,即树Tij的根,记为R(i, j)。
依据R(0, n)…,推导树的形态
- 2022-03-04 13:28:28下载
- 积分:1
-
活动选择算法的的 c + + 程序
这是 c 语言程序的活动选择问题。请阅读它。它非常简单和写在 c + +
- 2022-08-08 18:13:58下载
- 积分:1
-
GAC模型,迎风方案
im=imread("e:301clip301.tif");
im=rgb2gray(im);
im=double(im);
im = imresize( im, 0.5 ); % 为了减少程序运行时间,将图像变小为原来大小的1/2
figure(1);imshow(uint8(im));
[nrow,ncol]=size(im);
J= gauss( im,3,2 ); % 为了计算函数g,先对图像作guassian预平滑
%%- 计算图像梯度模值
J_x = (J(:,[2:ncol ncol])-J(:,[1 1:ncol-1]))/2;
J_y = (J([2:nrow nrow],:)-J([1 1:nrow-1],:))/2;
请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报
- 2022-04-14 21:25:24下载
- 积分:1
-
VC下最牛的算数表达式,将math.h 所有函数都集成到一起都能用计算出来,包括加减乘除;(、 正玄、 余玄,乘方,log ln,等...
VC下最牛的算数表达式,将math.h 所有函数都集成到一起都能用计算出来,包括加减乘除;(、 正玄、 余玄,乘方,log ln,等 -VC most cattle arithmetic expression math.h will integrate all functions are used together can be worked out including the arithmetic; (, Shogen, Yuxuan, involution, ln log, etc.
- 2022-02-20 17:13:59下载
- 积分:1
-
平面三角形单元有限元计算程序,能算各种以三角形单元划分的平面问题
平面三角形单元有限元计算程序,能算各种以三角形单元划分的平面问题
-Plane triangular element finite element program that can count a variety of triangular element into the plane problem
- 2022-01-26 00:09:11下载
- 积分:1
-
本代码是《计算机常用数值计算算法与程序 C++版》一书的配套数值拟合与逼近代码,这些C++程序已经在Virsual C++ 6.0环境下通过。注意,在VC++...
本代码是《计算机常用数值计算算法与程序 C++版》一书的配套数值拟合与逼近代码,这些C++程序已经在Virsual C++ 6.0环境下通过。注意,在VC++ 6.0中设置好路径,特别是include目录(文件夹)的路径,否则在编译时会出现找不到头文件的错误,使编译无法正常进行。-the code is "commonly used computer numerical algorithms and procedures C version," a book supporting numerical approximation fitted with the code, these procedures have been in C C 6.0 Virsual environment through. The attention of the VC 6.0 installed path, in particular include directory (folder) path, otherwise there will be compiled header files could not find the mistakes and the compiler not normal.
- 2022-06-27 07:38:27下载
- 积分:1
-
外推法解微分方程组,并给出实例。外推法首先给丁初始补偿,软件自动决定下一步的步长...
外推法解微分方程组,并给出实例。外推法首先给丁初始补偿,软件自动决定下一步的步长-Extrapolation solution differential equations, and gives examples. First, extrapolation to the small initial compensation, the software automatically decide on the next step of
- 2022-02-04 09:12:58下载
- 积分:1
-
Binary Search Tree
Binary Search Tree - with additional recursion functions (smallest, parent & successor) etc-Binary Search Tree- with additional recursion functions (smallest, parent & successor) etc
- 2022-01-28 01:15:26下载
- 积分:1
-
一个用c++和opency的链接来实现把一张图片显示在桌面上的图片
一个用c++和opency的链接来实现把一张图片显示在桌面上的图片,对一个初学者来说把一张图片显示在桌面上面也是一个和困难的过程,这个程序比较穿,你可以把cpp里面的内容复制然后在新建一个c++文件,贴在新建的cpp脸面就可以运行,然后把一个图片保存在程序制定的地方就OK啦
- 2023-04-07 20:45:04下载
- 积分:1
-
基于眼动跟踪的驾驶员疲劳检测
Driver Fatigue Detection Based on Eye Tracking
- 2022-03-18 05:38:51下载
- 积分:1