CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - INT 1
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Search - INT 1 - List
[
Algorithm
]
DB05
DL : 0
矩阵运算的算法 用Type类数组创建矩阵对象 matrix(int rows,int cols) //创建矩阵,值为0 matrix(int n) //创建单位阵 matrix(const matrix &) //拷贝构造函数 BOOL Ismatrixf(){ return (rows==cols) } //判断矩阵是否为方阵 modifyrowscols(int rows,int cols) //修改矩阵的行列数 ~matrix() {delete []elems } //析构函数 -matrix algorithm with Type category created matrix array object matrix (int rows, int cols)// create matrix, value of 0 matrix (int n)// create units matrix array (const matrix
Date
: 2026-01-07
Size
: 1.49mb
User
:
跑过的云
[
Algorithm
]
TriSpline
DL : 0
三次样条插值程序。编译运行本程序后,程序会弹出窗口及问句:“input the number of intervals:”,输入插值的次数即可,程序将得到的次数保存在变量int n中。如果输入的插值次数正确(n>=2),程序会显示下一语句:"input the value of the variable:",此时输入插值点即可,程序将得到的插值点保存在变量double v中。若插值点正确(v>=0&&v<=6),则程序将输出插值结果。-cubic spline interpolation procedure. Compiling the operation procedures, the program will pop-up window and query : "input the number of intervals :", the number of imported interpolation can be. procedures will be stored in the number int n variables. If the input frequency correct interpolation (n
Date
: 2026-01-07
Size
: 274kb
User
:
唐新猛
[
Algorithm
]
ModifyShiftAverageRegress
DL : 0
移动平均预测 ModifyShiftAverageRegress.cs 移动平均也可画趋势图,如下: public double forecast(int interval) 移动平均认为数据是时间序列数据,该方法预测interval个时间间隔后的值 public override double[] getTrendArray() 得到趋势数组,该数组的数据直接在图形中展示出来就可以产生趋势线。 -Moving average moving average prediction ModifyShiftAverageRegress.cs trends can also be painted as follows: public double forecast (int interval) consider moving average data are time-series data, the method of prediction interval of time after the interval the value of public override double [] getTrendArray () be the trend of the array, the array of data directly in the graphical display can be generated by the trend line.
Date
: 2026-01-07
Size
: 3kb
User
:
wangyinghao
[
Algorithm
]
exchange
DL : 0
自制的将一个int型数据转化为有数值意义的二进制。-Made a int-type data into binary have numerical significance.
Date
: 2026-01-07
Size
: 323kb
User
:
林文
[
Algorithm
]
Iluk
DL : 0
这是用于线性方程组求解的ILUK预处理算法的实现。在VC++编译通过。矩阵采用压缩稀疏行格式存储(CSR),采用如下结构存储:struct Distmatrix {double **ma int **ja,dimension,*nnzrow } 很容易移植到自己定义数值计算软件包中。经本人测试计算效率比Fortran写的高很多(比如与Sparskit2比较)。-This is used for solving linear equations ILUK preconditioning algorithm. In VC++ Compiled through. Matrix using compressed sparse row storage format (CSR), using the following structure of memory: struct Distmatrix (double** ma int** ja, dimension,* nnzrow) be easily transplanted to their own definition of numerical computation package. I tested by calculating the efficiency ratio is much higher Fortran write (for example, compared with Sparskit2).
Date
: 2026-01-07
Size
: 525kb
User
:
张德柱
[
Algorithm
]
int
DL : 0
符号积分法,有中文注释,大家试试,供参考学习~-Symbolic integration, notes in Chinese, we try, for reference to learn ~
Date
: 2026-01-07
Size
: 1kb
User
:
kreaya
[
Algorithm
]
Matrix
DL : 0
设计一个造成矩阵类Matrix,包含一个元素类型为int的二维数组,分别设计一个静态方法和实例方法把矩阵转置,分别设计静态方法和实例方法实现二个矩阵相加、相乘。重写方法toString(),使其能输出此矩阵。-Caused by the design of a matrix of type Matrix, contains an element type for the two-dimensional array of int, respectively, to design a static method and examples of ways to transpose the matrix, respectively, the static design methods and examples of methods to achieve the sum of two matrices, multiply. Rewrite the method toString (), so that it can output this matrix.
Date
: 2026-01-07
Size
: 1kb
User
:
5235668
[
Algorithm
]
pr1
DL : 0
#include<stdio.h> void main(void) {int n,k,derivata,a[10],i printf("n=") scanf(" d",&n) for(i=0 i<=n i++) { printf("a[ d]=",i) scanf(" d",&a[i]) } printf("k=") scanf(" d",&k) for(derivata=1 derivata<=k derivata++) { for(i=0 i<=n i++) a[i]=a[i]*(n-i) n-- for(i=0 i<=n i++) printf(" d ",a[i]) printf("\n") -#include<stdio.h> void main(void) {int n,k,derivata,a[10],i printf("n=") scanf(" d",&n) for(i=0 i<=n i++) { printf("a[ d]=",i) scanf(" d",&a[i]) } printf("k=") scanf(" d",&k) for(derivata=1 derivata<=k derivata++) { for(i=0 i<=n i++) a[i]=a[i]*(n-i) n-- for(i=0 i<=n i++) printf(" d ",a[i]) printf("\n") }}
Date
: 2026-01-07
Size
: 1kb
User
:
xwing
[
Algorithm
]
int
DL : 0
求解积分方程,(1)使用复化Simpson方法求积分(2)使用三次样条求积分值,并比较离散解与真解之间的误差,附件有详细说明-Solving integral equation (1) the use of complex methods for integration of Simpson (2) the use of cubic spline points for value, and compare the discrete solution and the error between true solution, is described in detail in Annex
Date
: 2026-01-07
Size
: 12kb
User
:
pei
[
Algorithm
]
a
DL : 0
编写具有如下函数原型的非递归两种函数f,负责判断数组a的前n个元素是否从大到小完全有序了,是则返回true,否则返回false。并编制主函数对它们进行调用,以验证其正确性。 bool f(int a[], int n) 提示: 非递归函数中只需逐对地判断各a[i]与a[i+1]是否都已从大到小有序排列(i = 0,1,…,n-2)。-Prepared with the following function prototype of two non-recursive function f, is responsible for judging the array a is the first n elements beginning with the largest totally ordered, and that returns true, otherwise returns false. And the preparation of the main function call them to verify their accuracy. bool f (int a [], int n) Note: non-recursive function of the judge only by the a [i] and a [i+1] is already big to small ordered arrangement (i = 0 , 1, ..., n-2).
Date
: 2026-01-07
Size
: 868kb
User
:
班友杰
[
Algorithm
]
_sncndn@20and_Cardano@56
DL : 0
调用MATHLIB37.DLL中的函数_sncndn@20计算三个雅可比椭圆函数sn(e,x),cn(e,x),dn(e,x)在实数域上的值,作为参变量为e的一元实函,sn,cn,dn的周期分别为4K(e),4K(e),2K(e),其中uu=x为实数,emmc=1-e^2称为补模的平方,e=c/a=k称为模或椭圆的离心率。函数原型为void sncndn(float uu,float emmc,float *sn,float *cn,float *dn) 用MATHLIB37.DLL中的函数_Cardano@56可以计算实系数一元三次方程ay^3+by^2+cy+d=0的3个复根,该算法是直接根据Cardano公式得来的,函数原型为void __stdcall Cardano(double a,double b,double c,double d,double *real_y1,double *real_y2,double *real_y3,double *imag_y1,double *imag_y2,double *imag_y3) 也可以用MATHLIB37.DLL中的函数_dqrrt@28求实系数一元n次方程a[n]x^n+a[n-1]x^(n-1)+…+a[0]=0的n个复根xr[k]+xi[k]i,0<=k<n,该算法可以看作是代数基本定理的构造性证明在数值算法中的应用,函数原型为int dqrrt(double a[],int n,double xr[],double xi[],double eps,int jt) -void sncndn(float uu,float emmc,float*sn,float*cn,float*dn) void __stdcall Cardano(double a,double b,double c,double d,double*real_y1,double*real_y2,double*real_y3,double*imag_y1,double*imag_y2,double*imag_y3) int dqrrt(double a[],int n,double xr[],double xi[],double eps,int jt)
Date
: 2026-01-07
Size
: 71kb
User
:
hanxiaohua
[
Algorithm
]
konversi-bilangan
DL : 0
int i, j, k,b,n,s,t,r=1 float sum, c float a[12][12] //pengisian matrix printf("Masukkan ordo matriks : ") scanf(" d",&n) printf("masukkan banyak persamaan : ") scanf(" d",&b) for(i=0 i<n i++){ for(j=0 j<b j++){ printf("masukkan nilai matrik baris d kolom d : ",i+1,j+1) scanf(" f",&a[i][j]) }-int i, j, k,b,n,s,t,r=1 float sum, c float a[12][12] //pengisian matrix printf("Masukkan ordo matriks : ") scanf(" d",&n) printf("masukkan banyak persamaan : ") scanf(" d",&b) for(i=0 i<n i++){ for(j=0 j<b j++){ printf("masukkan nilai matrik baris d kolom d : ",i+1,j+1) scanf(" f",&a[i][j]) }
Date
: 2026-01-07
Size
: 1kb
User
:
cranda
[
Algorithm
]
satu
DL : 0
int i, j, k,b,n,s,t,r=1 float sum, c float a[12][12] //pengisian matrix printf("Masukkan ordo matriks : ") scanf(" d",&n) printf("masukkan banyak persamaan : ") scanf(" d",&b) for(i=0 i<n i++){ for(j=0 j<b j++){ printf("masukkan nilai matrik baris d kolom d : ",i+1,j+1) scanf(" f",&a[i][j]) }-int i, j, k,b,n,s,t,r=1 float sum, c float a[12][12] //pengisian matrix printf("Masukkan ordo matriks : ") scanf(" d",&n) printf("masukkan banyak persamaan : ") scanf(" d",&b) for(i=0 i<n i++){ for(j=0 j<b j++){ printf("masukkan nilai matrik baris d kolom d : ",i+1,j+1) scanf(" f",&a[i][j]) }
Date
: 2026-01-07
Size
: 1kb
User
:
cranda
[
Algorithm
]
Keda-Matrix
DL : 0
可达矩阵求法 动态分配一维数组 去掉字符串中的空格和回车 将Cstring转换成int数组-Matrix Method to dynamically allocate up to one-dimensional array of strings to remove spaces and carriage returns will be converted to int array Cstring
Date
: 2026-01-07
Size
: 5.03mb
User
:
张步阳
[
Algorithm
]
scientific_calculator
DL : 0
使用说明: 1、该计算器对表达式的要求比较严格 2、该计算器默认采用弧度制,计算角度时则要转换:sin(π/6)=0.5 3、括号必须要匹配 4、注意像And这样的运算,前后数值需要括号:(1011)And(1000) 其他说明: Backspace :删除当前输入的最后一位。 CE :清除当前显示的表达式。 C :清除当前的计算,开始新的计算。 MC :清除存储器中的数据。 MR:调用存储器中的数据。 Mod求模(即整数相除求余数) And按位与, Or按位或, Xor按位异或 dms度分秒切换 Lsh左移, Not按位取反, Int取整数部分 三角函数运算,cos余弦, sin正弦, tan正切 log常用对数, n!阶乘, ln自然对数, 指数运算,F-E科学计数法开关 -Instructions: 1, the calculator more stringent requirements for expression 2, the calculator defaults to radians, the angle will have to calculate the conversion: sin (π/6) = 0.5 3, the brackets must be matched 4, note that operations such as And, need parentheses around the value: (1011) And (1000) Other notes: Backspace: Delete the current input of the last one. CE: Clear the current display of expression. C: clear the current calculation, start a new calculation. MC: Clear memory data. MR: call data in the memory. Mod Modulus (division remainder is an integer number) And by bit and, Or by bit or, Xor bitwise XOR dms degrees minutes and seconds to switch Lsh left, Not bitwise negation, Int take the integer part Trigonometric functions, cos cos, sin sine, tan tangent log common logarithm, n! factorial, ln the natural logarithm, Exponentiation, F-E switch in scientific notation
Date
: 2026-01-07
Size
: 1009kb
User
:
fay
[
Algorithm
]
c-P-P-algorithm-procedures
DL : 0
程序开始运行,要求用户首先输入两个大数。 然后进行菜单选择,进行相应的大数运算。 分析说明:由于大数的范围太大,不能直接定义为int或者float等, 所以我们的想法就是定义成字符串类型, 输入的数字一位一位地存入字符数组里面。 然后在运算的时候也是一位一位地运算。 这个过程就得从最基本的数学运算法则做起,不乏多种判断。 涉及到数组和指针的应用。最难的就是判断情 况还有应用数组和指针过程中出现的多种未可预知的错误, 还得通过逐步调试慢慢找出。我们先从加减法做起,然 后在这两个基础上做出乘除法还有高阶乘法。 比较麻烦的是减法和除法,因为涉及到位的转移及判断。 最后是main函数的设计,主要是设计成可以连续使用的, 还有就是比较友好的界面。运用到了swich函数。还有那个图形的设计。-Program started running, require the user to enter first two operation. Then the menu option, undertake corresponding tarsus operations. Analysis in this paper shows that: because of the large range is too big, can not directly defined as int or float, So our idea is defined as a string literal, The number of input a a deposit to string array inside. And then in the operation of time also is a a ground operations. This process will have to from the most basic mathematical algorithms, starts to there is no lack of judgment. Involves the application of array and pointer. The most difficult judgment is feeling Conditions and application array pointer and appeared in the process of many unforeseen predictable wrong, Still have to go through gradually debugging slowly find out. We start from the first addition and subtraction, however In the two after a method based on the mentalistic and high factorial method. More trouble is subtraction and division, and because of the transf
Date
: 2026-01-07
Size
: 269kb
User
:
yang
[
Algorithm
]
Conversion-between-the-values
DL : 0
实现数值之间的进制转化,可以实现二进制、十进制和十六进制的转化,关键在于能够实现超过long int型的二进制转化,不受内存整形数据类型大小的限制-Values between hex conversion, binary, decimal, and hexadecimal conversion, the key is to be able to achieve more than long int type binary transformation, from memory the size of the integer data type restrictions
Date
: 2026-01-07
Size
: 1.45mb
User
:
夏东喜
[
Algorithm
]
stats
DL : 0
Stats program to get stats of any list of int
Date
: 2026-01-07
Size
: 7kb
User
:
Andy
[
Algorithm
]
Large-Int-Multi(list)
DL : 0
大整数相乘,使用链表的方式实现的,能够正确演示结果-Large integer multiplication using linked list implementation, able to correctly demonstrate results
Date
: 2026-01-07
Size
: 4.75mb
User
:
czy
[
Algorithm
]
磁力轴承部分源代码
DL : 0
关于磁力轴承的部分代码 void CCaculationDlg::OnBUTTONBegin() { int h,i,j,k,l,m; double otdeg,innerrad1,outrad1,rad1,area1,innerrad2,outrad2,rad2,area2,beta,alpha,x1,x2,y1,y2,sx,sz,smy,sumx=0,sumz=0,summy=0,fx,fz,my; double InnerRad1,OutRad1,InnerRad2,OutRad2,BiasDis,tempz1,tempx2,CorZ1,CorZ2,AxisL1,AxisL2; CString s; UpdateDate(TRUE); if(m_rotdeg!=0&&m_biasdis!=0) MessageBox("“偏心距”或者“两轴线夹角”设置错误,请重新输入!","警告!",MB_OK);
Date
: 2015-01-16
Size
: 2.85kb
User
:
2418080263@qq.com
«
1
2
3
4
5
»
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.