利用多态性编程,创建一个square类,实现求三角形、正方形和圆形面积。方法 //抽象出一个共享的类,定义一个函数求面积的公共界面。再重新定义各面积的求面积 //函数,在主类中创建不同类的对象,并求不同形状的面积
标签: 编程
上传时间: 2013-12-16
上传用户:athjac
直线拟合的几种算法,其中包括线性最小二乘,和两种不同目标函数的非线性最小二乘,用于比较这些方法的优劣,另外matlab中说的robust least squares方法没有找到,希望有朋友能给穿一下:)
上传时间: 2014-06-18
上传用户:大三三
This program demonstrates some function approximation capabilities of a Radial Basis Function Network. The user supplies a set of training points which represent some "sample" points for some arbitrary curve. Next, the user specifies the number of equally spaced gaussian centers and the variance for the network. Using the training samples, the weights multiplying each of the gaussian basis functions arecalculated using the pseudo-inverse (yielding the minimum Least-squares solution). The resulting network is then used to approximate the function between the given "sample" points.
标签: approximation demonstrates capabilities Function
上传时间: 2014-01-01
上传用户:zjf3110
声明一个基类Shape(点), 在此基础上派生出Rectangle(长方形)和Circle(圆),这三个类都有GetArea()函数计算对象的面积,构造函数,析构函数等有关函数。再使用Rectangle类创建一个派生类Square(正方形)。并设计创建各种类的对象,调用所有函数。设计函数f(Shape &a)能对不同对象的实参调用计算打印出对象的面积。
标签: Rectangle GetArea Circle Shape
上传时间: 2015-07-07
上传用户:netwolf
平均因子分解法,适用于正定矩阵First, let s recall the definition of the Cholesky decomposition: Given a symmetric positive definite square matrix X, the Cholesky decomposition of X is the factorization X=U U, where U is the square root matrix of X, and satisfies: (1) U U = X (2) U is upper triangular (that is, it has all zeros below the diagonal). It seems that the assumption of positive definiteness is necessary. Actually, it is "positive definite" which guarantees the existence of such kind of decomposition.
标签: 分解
上传时间: 2013-12-24
上传用户:啊飒飒大师的
his project was built and tested with WinAVR-20060125. Make sure the MCU target define in the Makefiles corresponds to the AVR you are using!! To build the code, just install WinAVR and run "make" from the console in echomaster and echoslave subdirs. "make program" will program the device if you have a AVRISP attached. Remember to set the AVR device to at least 8MHz. The AVR may use the programmable clock from MC1319x, just remember to check if the MC1319x and SPI communication is working FIRST! Otherwise you wont get any clock signal to the AVR and then you can t program it or reset the fuses! The MC1319x has default clock output of 32kHz so you will have to set your programmer to a very low frequency (<=32kHz/4) to be able to program it while it is running on that!
标签: the 20060125 project WinAVR
上传时间: 2014-10-10
上传用户:yan2267246
A fast customizable function for locating and measuring the peaks in noisy time-series signals. Adjustable parameters allow discrimination of "real" signal peaks from noise and background. Determines the position, height, and width of each peak by Least-squares curve-fitting.
标签: customizable time-series measuring function
上传时间: 2015-08-10
上传用户:invtnewer
this m file can Find a (near) optimal solution to the Traveling Salesman Problem (TSP) by setting up a Genetic Algorithm (GA) to search for the shortest path (least distance needed to travel to each city exactly once) Notes: 1. Input error checking included 2. Inputs can be specified in any order, so long as the parameter pairs are specified as a parameter , value
标签: Traveling Salesman solution Problem
上传时间: 2013-12-22
上传用户:ruixue198909
Chessboard Cover,On a chessboard,only one square is different, called specific.Use the Divide-and-Conquer methods to solve the Chessboard Cover Problem.
标签: Chessboard chessboard Cover On
上传时间: 2015-10-05
上传用户:zuozuo1215
This unit uses an array of bytes to represent a LARGE number. The number is binairy-stored in the array, with the Least Significant Byte (LSB) first and the Most Significant Byte (MSB) last, like all Intel-integer types.
标签: number binairy-stored represent LARGE
上传时间: 2015-10-08
上传用户:xieguodong1234