-
cython写的DTMF解码器(python直接使用,效率和c接近)
cython写的DTMF解码器(python直接使用,效率和c接近)
- 2022-01-27 10:28:11下载
- 积分:1
-
1-9数字填入三个分式的a-i中,使a/bc+d/ef+g/hi=1成立-1-9 the number of fill in the three fraction of ai, so that a/bc+ d/ef+ g/hi = 1 to set up
- 2022-03-06 01:28:29下载
- 积分:1
-
一、前言
24点游戏是一个常见游戏,出题者给出4个整数,要求答题者在指定时间内给出一个四则运算的表达式,恰好用上这这个整数各一次,计算结果为24,超出时间为...
一、前言
24点游戏是一个常见游戏,出题者给出4个整数,要求答题者在指定时间内给出一个四则运算的表达式,恰好用上这这个整数各一次,计算结果为24,超出时间为输。
二、分析
用计算机来算这个题,搜索速度当然有很大优势,我编程喜欢考虑通用一点,不限制输入数量和结果数,甚至不限制运算符数量。这样组合数就很大,如果输入数比较多,则搜索时间会非常长。
我用两个方法来提高搜索速度:一、是大家都能考虑到的重复搜索问题,比如1,2,3和2,3,1所有的组合情况是相同的,我只搜索使用递增序的数组,则可以降低一个组合数的数量级别;二、使用动态规划中的备忘录方法,比如你计算出2和3所有可能的计算结果,则他们与4结合的时候,要用到,与1结合的时候,也要用到,使用备忘录,可以只计算一次,大大降低运算复杂度。
三、设计
整体设计:分别设计4个类:游戏、表达式、运算、分数,各司其责,结构清晰,易于扩展。
-First, the preamble
24-point game is a common game, give the title are four integer requiring answer within a specified period of time in a four calculations give the expression, just use that the integral of the time, results for the 24, beyond the time to lose.
Second, analysis
Use computers to count the title, the search speed of course, there is a great advantage, I enjoy taking generic programming that does not restrict the importation of the volume and the number of results, and even limiting the number of operators. So on a large number of combinations, if you
- 2022-04-21 18:17:05下载
- 积分:1
-
遗传算法计算最短路径
mtspf_ga.m是主函数,floyed 是计算任意两点最短路径的算法,myLength 是计算距离的函数,lujing是本例子中所需的数据,只需运行ceshide 即可完美解决“最佳灾情巡视路线问题”。
- 2022-11-18 01:25:03下载
- 积分:1
-
解TSP问题的GA程序
解TSP问题的GA程序-solution of TSP procedures GA
- 2022-02-03 12:42:37下载
- 积分:1
-
DFP变尺度法,包括一维搜索法,黄金分割法,采用类封装,包括矩阵类,变尺度类。实现简单明了。...
DFP变尺度法,包括一维搜索法,黄金分割法,采用类封装,包括矩阵类,变尺度类。实现简单明了。-DFP variable metric method, including the one-dimensional search, golden section method, type of packaging used, including matrix-type, variable-scale category. Simple to achieve.
- 2022-06-03 06:57:24下载
- 积分:1
-
数独计算
在已知数字区域填充上数字,然后计算未知区域的数字。
使用Visual C++开发,用mfc开发界面,但界面十分简单,主要为计算提供算法。
使用递归算法,计算每个未知数字的区域可能的填写的数字,然后分别去测试该位置数字填写是否正确,直到找到答案或出现冲突。
- 2022-03-25 00:52:55下载
- 积分:1
-
一个可分解上万阶稀疏矩阵的SVD算法
一个可分解上万阶稀疏矩阵的SVD算法-a million bands on the sparse matrix of SVD algorithm
- 2022-12-19 12:20:03下载
- 积分:1
-
离散余弦变换程序
离散余弦变换程序-discrete cosine transform procedures
- 2022-03-23 01:04:33下载
- 积分:1
-
D-S证据理论
本算法 从最简单的程序,渐渐深入,能够让读者以最快的速度,学会D-S算法在matlab中的实现过程。算法中标有详细的注释,最大程度上帮助读者完全掌握。
- 2022-02-03 17:15:47下载
- 积分:1