Curve-Fitting
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:
Curve Fitting
jpp30@pitt.edu
20 March 2012


INTRODUCTION

This project implements a Lagrange Polynomial and a Cubic Spline for a set of points in the plane. Specifically, given a set of uniformly distributed points (with x-coordinates 0, 1, 2, etc.), the program fits the following curves to them:

The Lagrange Polynomial.
A Cubic Spline.

The program fits and graphically displays curves for up to a few dozen points (although the Lagrange Polynomial might not look very good due to the high-degree terms).


FILES

The following files should be present:

	Lagrange.java - Lagrange class, to do Lagrange interpolation
	Spline.java - Spline class, to calculate cubic spline
	Graph.java - Graph class, to graph points
	Polynomial.java - Polynomial class, to evaluate polynomials
     	DemonstrateCurveFitting.java - Test file for Lagrange and Spline classes


USAGE

Compile in Java 2 SDK 1.6 with:

     javac DemonstrateCurveFitting.java

Run with:

     java DemonstrateCurveFitting


KNOWN PROBLEMS

Lagrange interpolation does not work well for more than 15 points due to the high degree terms, but Lagrange Interpolation should really only be used for a small number of points so this is relatively trivial.



本源码包内暂不包含可直接显示的源代码文件,请下载源码包。