|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectuk.ac.ed.ph.integrator.DataDerivative
uk.ac.ed.ph.integrator.DataPoint
public class DataPoint
Class to hold a single DataPoint consisting of an x coordinate and a array of y coordinates for use in integrator methods.
| Field Summary |
|---|
| Fields inherited from class uk.ac.ed.ph.integrator.DataDerivative |
|---|
fmt, x, y |
| Constructor Summary | |
|---|---|
DataPoint()
Default constrcuor, set x=0 and y[] array to null |
|
DataPoint(double x,
double[] y)
Constructor to form a DataPoint from a x coordinate and y array |
|
DataPoint(int size)
Constrcuor to form a DataPoint with specified size of y array, and all values are set to zero |
|
| Method Summary | |
|---|---|
void |
addToX(double step)
Method add to the current value of the X. |
void |
addToY(int i,
double delta)
Method to add to a single y element. |
DataPoint |
clone()
Method to return a clone of the current DataPoint including a copy of the y array. |
double |
error(DataPoint p)
The default error between two DataPoints, currently set as the normalsied square error |
DataPoint |
eulerStep(DataDerivative delta,
double step)
Method to for a new DataPoint by propagating the current point a specified distance (step), with the differentials in delta using the simple Euler scheme |
String |
formatPoint()
Method to format a point as a String for file output with x value and each y[] element seperated by a space. |
double |
maximumError(DataPoint p)
Method to calcuate the absolute maximum error between elemenst of the y paramter array |
void |
setDefaultError(int code)
Method to set the default error |
double |
squareError(DataPoint p)
Calcualte the normalsied square error between the current DataPoint as the specified DataPoint |
DataPoint |
weightedStep(DataDerivative[] delta,
double[] w,
double step)
Method to a new DataPoint be propagating the current DataPoint by a weighted step. |
| Methods inherited from class uk.ac.ed.ph.integrator.DataDerivative |
|---|
getX, getY, getY, setFormatString, setX, setY, setY, size, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DataPoint()
public DataPoint(double x,
double[] y)
x - the x valuey - the y data arraypublic DataPoint(int size)
size - size of y variable array| Method Detail |
|---|
public DataPoint clone()
clone in class DataDerivativeDataPoint clone of current DataPointpublic void addToX(double step)
step - the value to ve added.
public void addToY(int i,
double delta)
i - the element to be setdelta - the valeu to be added.public String formatPoint()
String formatted String.public double squareError(DataPoint p)
p - the specified DataPoint
double Normalsied square error.public double maximumError(DataPoint p)
p - the spefied DataPoint
double the absolute maximun error (not
normalsied)public void setDefaultError(int code)
public double error(DataPoint p)
p - the specified DataPoint
double the default error
public DataPoint eulerStep(DataDerivative delta,
double step)
delta - the specified differentialstep - the step distance.
public DataPoint weightedStep(DataDerivative[] delta,
double[] w,
double step)
delta - array of differntialsw - the wieght of the corresponding differentials
(assumed to sum to 1.0)step - the step
DataPoint the wiegthed steped DataPoint.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||