-
qang-bs46
sar图像去噪的几种新的方法,数学方法是部分子空间法,实现典型相关分析。( Several new methods sar image denoising, Mathematics is part of the subspace, Achieve canonical correlation analysis.)
- 2017-04-02 17:37:58下载
- 积分:1
-
11087 统计逆序对
Description
设a[0…n-1]是一个包含n个数的数组,若在i<j的情况下,有a[i]>a[j],则称(i, j)为a数组的一个逆序对(inversion)。
比如 <2,3,8,6,1> 有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, <2,3,8,6,1> 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
-
matrix_transpose.c
适用于大型稀疏矩阵 矩阵转置 c语言 来自于有限元方法编程(From the finite element method suitable for large-scale sparse matrix matrix transpose c language programming)
- 2013-05-20 10:43:20下载
- 积分:1
-
SVM
回归分析,该支持向量机算法可用于预测,电力负荷、风力发电预测等(Regression analysis, the support vector machine algorithm can be used to forecast the power load, wind power prediction)
- 2017-08-16 10:43:04下载
- 积分:1
-
mgjyxl
第一个把专家青睐的数学模型技术(NNM 算法模型)引入词汇记忆软件中,并取得了巨大的成功。NNM 算法模型与经典的“艾滨豪斯遗忘曲线”真正的融合于一体,使得该著名的理论在计算机与数学模型下第一次得到了淋漓尽致的发挥。(First a mathematical model of the popular technology expert (NNM algorithm model) the introduction of vocabulary learning software, and has achieved great success. NNM algorithm model and the classic " Ai Bin House forgetting curve" true integration in one, making the well-known theory in computer and mathematical models has been most vividly the first time under play.)
- 2011-07-23 17:03:32下载
- 积分:1
-
Montecarlo_SNR
用牛顿迭代法估计正弦信号的幅度,相位,频率,选用多次montecalor算法估计参数均值,并与理论上参数估计的CRLB下限进行比较。(Newton iterative method estimates the sinusoidal signal amplitude, phase, frequency, use multiple montecalor algorithm to estimate the parameters mean, and with the theoretical limit of parameter estimation CRLB compare.)
- 2021-03-01 11:29:35下载
- 积分:1
-
MESH-FREE-MLS-SHAPE-FUNCTION
无网格法移动最小二乘近似(MLS)型函数计算子程序 (Meshless method moving least square approximation (MLS) type function calculation subroutine)
- 2013-09-27 10:32:13下载
- 积分:1
-
Conjugate-Gradient-Method
共轭梯度法(Conjugate Gradient)是介于最速下降法与牛顿法之间的一个方法,它仅需利用一阶导数信息,但克服了最速下降法收敛慢的缺点,又避免了牛顿法需要存储和计算Hesse矩阵并求逆的缺点,共轭梯度法不仅是解决大型线性方程组最有用的方法之一,也是解大型非线性最优化最有效的算法之一。 在各种优化算法中,共轭梯度法是非常重要的一种。其优点是所需存储量小,具有步收敛性,稳定性高,而且不需要任何外来参数。(Conjugate gradient method (Conjugate Gradient) is between the steepest descent method between the method and Newton' s method, it takes only a first derivative information, but to overcome the steepest descent method convergence slow shortcomings, but also to avoid the Newton method needs to be stored Hesse and disadvantages of computing inverse matrix and the conjugate gradient method is not only one of the most useful methods to solve large linear equations, solution of large-scale nonlinear optimization is one of the most effective algorithm. In various optimization algorithm, conjugate gradient method is a very important one. The advantage is that a small amount of memory required, with step convergence, high stability, and does not require any external parameters.)
- 2017-03-14 15:48:15下载
- 积分:1
-
big-intger-plus-minus-multiply
C语言实现大数的加法减法以及乘法,水平限于仅仅大学生水平学习使用。(Use C language to achieve that addition, subtraction, and multiplication of a big intger.)
- 2013-05-11 13:52:20下载
- 积分:1
-
acoustic_fir_floor
这是地球物理学中声波波动方程正演程序,非常有用(this is a program about finite difference)
- 2014-05-31 23:43:08下载
- 积分:1