-
PolynomialCurveFitting
说明: 基于python的多项式曲线拟合,本程序以1 3 5 9次为例子。(Based on the polynomial curve fitting of python, this program takes 1 3 5 9 times as an example.)
- 2020-05-28 10:04:30下载
- 积分:1
-
a
说明: 矩阵的转置,相乘及界面的面换稀疏矩阵的三元组相加(Sum of the transpose of the matrix, multiplying, and interfacial surface replacing the sparse matrix triples)
- 2012-09-04 15:33:18下载
- 积分:1
-
kriging
kriging方法源程序,用于kriging方法构建近似模型,方便易懂(kriging method source,Kriging method used to construct an approximate model, easy to understand)
- 2021-04-26 10:08:45下载
- 积分:1
-
cpso
粒子群算法在解决非线性方程上的应用,给出了详细程序(Particle swarm algorithm for solving nonlinear equations, gives detailed procedures)
- 2012-09-12 11:14:34下载
- 积分:1
-
MCZTFFT
说明: CZT和FFT的C语言实现代码,能有效滤除谐波,噪声。获得信号的频率,是一种良好的频率测量算法。(CZT and FFT of the C language code, can effectively filter out harmonics and noise. Access to the signal frequency, is a good algorithm for frequency measurement.)
- 2020-11-19 19:29:38下载
- 积分:1
-
CompDam_DGD
摩擦力是抵抗固體表面,流體層和材料元件相對滑動的相對運動的力。有幾種類型的摩擦:幹摩擦是一種與之相反的力(friction is the force resisting the relative motion of solid surfaces, fluid layers, and material elements sliding against each other. There are several types of friction: Dry friction is a force that opposes the)
- 2020-06-23 10:00:01下载
- 积分:1
-
11087 统计逆序对
说明: Description
设a[0…n-1]是一个包含n个数的数组,若在ia[j],则称(i, j)为a数组的一个逆序对(inversion)。
比如 有5个逆序对。请采用类似“合并排序算法”的分治思路以O(nlogn)的效率来实现逆序对的统计。
一个n个元素序列的逆序对个数由三部分构成:
(1)它的左半部分逆序对的个数,(2)加上右半部分逆序对的个数,(3)再加上左半部分元素大于右半部分元素的数量。
其中前两部分(1)和(2)由递归来实现。要保证算法最后效率O(nlogn),第三部分(3)应该如何实现?
此题请勿采用O(n^2)的简单枚举算法来实现。
并思考如下问题:
(1)怎样的数组含有最多的逆序对?最多的又是多少个呢?
(2)插入排序的运行时间和数组中逆序对的个数有关系吗?什么关系?
输入格式
第一行:n,表示接下来要输入n个元素,n不超过10000。
第二行:n个元素序列。
输出格式
逆序对的个数。
输入样例
5
2 3 8 6 1
输出样例
5(Set a[0... N-1] is a n array containing n numbers. If there is a [i] > a [j] i n the case of I < j, then (i, j) is a n inversion pair of a array.
For example, has five reverse pairs. Please use the idea of "merge sorting algorithm" to achieve the statistics of inverse pairs with O (nlogn) efficiency.
The number of inverse pairs of a sequence of n elements consists of three parts:
(1) The number of reverse pairs in the left half, (2) the number of reverse pairs in the right half, (3) the number of elements in the left half is greater than that in the right half.
The first two parts (1) and (2) are implemented by recursion. To ensure the final efficiency of the algorithm O (nlogn), how should the third part (3) be implemented?
Do not use O (n ^ 2) simple enumeration algorithm to solve this problem.)
- 2019-01-07 23:52:06下载
- 积分:1
-
generation
遗传算法反演子程序,可用于地球物理非线性反演(The genetic algorithm inversion subroutine, can be used for nonlinear geophysical inversion)
- 2016-03-29 01:20:19下载
- 积分:1
-
高阶统计量
说明: 有用的软件,用于高阶统计量计算。代码完整,计算效率高。(useful software for high-end statistical calculation. Code integrity, high computational efficiency.)
- 2005-11-28 14:39:23下载
- 积分:1
-
kring123
克里金(Kriging)插值法又称空间自协方差最佳插值法,它是以南非矿业工程师D.G.Krige的名字命名的一种最优内插法。克里金法广泛地应用于地下水模拟、土壤制图等领域,是一种很有用的地质统计格网化方法。它首先考虑的是空间属性在空间位置上的变异分布.(Kringing smooth)
- 2020-09-16 21:57:55下载
- 积分:1