-
Shortest Path
资源描述Write a program to find the weighted shortest distances from any vertex to a given source vertex in a digraph. If there is more than one minimum path from v to w, a path with the fewest number of edges is chosen. It is guaranteed that all the weights are positive and such a path is unique for any vertex.
- 2022-08-26 06:49:00下载
- 积分:1
-
用拉格朗日插值公式,对给定的n用离散数据进行插值计算。
用拉格朗日插值公式,对给定的n用离散数据进行插值计算。-Lagrange interpolation formula, the right to use discrete n data interpolation.
- 2022-12-08 16:40:03下载
- 积分:1
-
98年全国大学生数学建模竞赛B题“水灾巡视问题”,是一个推销员问题,本题有53个点,所有可能性大约为exp(53),目前没有好方法求出精确解,既然求不出精确解,...
98年全国大学生数学建模竞赛B题“水灾巡视问题”,是一个推销员问题,本题有53个点,所有可能性大约为exp(53),目前没有好方法求出精确解,既然求不出精确解,我们使用模拟退火法求出一个较优解,将所有结点编号为1到53,1到53的排列就是系统的结构,结构的变化规则是:从1到53的排列中随机选取一个子排列,将其反转或将其移至另一处,能量E自然是路径总长度。具体算法描述如下:步1: 设定初始温度T,给定一个初始的巡视路线。步2 :步3 --8循环K次步3:步 4--7循环M次步4:随机选择路线的一段步5:随机确定将选定的路线反转或移动,即两种调整方式:反转、移动。步6:计算代价D,即调整前后的总路程的长度之差步7:按照如下规则确定是否做调整:如果D0,则按照EXP(-D/T)的概率进行调整步8:T*0.9-->T,降温-98 National Mathematical Contest in Modeling B and that the "flood inspections", is a salesman problem, and that is 53 points, all possibilities about exp (53), there is no good way to get accurate solutions, since no exact solution for, we used simulated annealing France obtained an optimum solution to all nodes to a number of 53 to 53.1 is with the system structure, changes in the structure of the rules is : from 1-53 with a randomly selected with a son, to reverse or to move it to another, the energy E is the natural path length. The specific algorithm is described as follows : Step 1 : The initial set temperature T,
- 2023-05-19 17:45:04下载
- 积分:1
-
聚类算法对无线网络节点的影响
自己编的,使用kmeans对网络节点进行划分,尽可能使路径最短,从而使无线网络收集点移动的距离最短
- 2022-03-13 22:27:19下载
- 积分:1
-
1维和2维快速傅里叶变换,网上广为流传的英文版本
1维和2维快速傅里叶变换,网上广为流传的英文版本-1-D and 2-D Fast Fourier Transform, Perform a 2D FFT inplace given a complex 2D array
- 2022-08-05 10:57:43下载
- 积分:1
-
国密算法
国密算法即国家密码局认定的国产密码算法,即商用密码。
主要有sm1,sm2,sm3,sm4
- 2023-05-16 00:35:02下载
- 积分: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
-
操作系统经典问题之银行家问题的源码实现及实验报告
资源描述
实现银行家算法,C++实现,主要内容是模拟实现动态资源分配。同时编写和调试一个系统动态资源的简单模拟程序,观察死锁产生的条件,并使用适当的算法,有效的防止和避免死锁的发生。
- 2023-04-03 07:45:03下载
- 积分:1
-
zhang并行算法
这是一种图像细化算法,是zhang快速并行算法
- 2022-08-09 08:39:18下载
- 积分:1
-
二分搜索CPP算法代码
二分查找又称折半查找,优点是比较次数少,查找速度快,平均性能好;其缺点是要求待查表为有序表,且插入删除困难。因此,折半查找方法适用于不经常变动而查找频繁的有序列表。首先,假设表中元素是按升序排列,将表中间位置记录的关键字与查找关键字比较,如果两者相等,则查找成功;否则利用中间位置记录将表分成前、后两个子表,如果中间位置记录的关键字大于查找关键字,则进一步查找前一子表,否则进一步查找后一子表。重复以上过程,直到找到满足条件的记录,使查找成功,或直到子表不存在为止,此时查找不成功。
- 2022-03-20 05:11:34下载
- 积分:1