|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hedgehog.HObject
com.hedgehog.math.interpolation.TripleFunctionCurveFit
public class TripleFunctionCurveFit
Title: TripleFunctionCurveFit - performs a fit of the function y=af0(x)+bf1(x)+cf2(x) through (x[],y[]) data.
Description: Performs a fit of the linear sum y=af0(x)+bf1(x)+cf2(x) through (x[],y[]) data.
Fits the linear sum y=af0(x)+bf1(x)+cf2(x) through the specified data using the least squares method described in J Meeus's book "Astronomical Algorithms", p44. The fit is a linear combination of the three functions f0(x), f1(x) and f2(x).
Copyright: Copyright (c) Hedgehog Software 2007-2009.
Company: Hedgehog Software
| Field Summary | |
|---|---|
protected OneVariableFunction |
mf0
Function f0(x). |
protected OneVariableFunction |
mf1
Function f1(x). |
protected OneVariableFunction |
mf2
Function f2(x). |
protected double[] |
mx
1D Java array of x values. |
protected double[] |
my
1D Java array of y values. |
| Fields inherited from class com.hedgehog.HObject |
|---|
mID, mName |
| Constructor Summary | |
|---|---|
TripleFunctionCurveFit(double[] x,
double[] y,
OneVariableFunction f0,
OneVariableFunction f1,
OneVariableFunction f2)
Constructor. |
|
TripleFunctionCurveFit(TripleFunctionCurveFit object)
Copy constructor. |
|
| Method Summary | |
|---|---|
double[] |
fit(java.lang.Object f0InvokingObject,
java.lang.Object f1InvokingObject,
java.lang.Object f2InvokingObject)
Fits the linear sum y=af0(x)+bf1(x)+cf2(x) through the (x[],y[]) data. |
OneVariableFunction |
getF0()
Returns mf0. |
OneVariableFunction |
getF1()
Returns mf1. |
OneVariableFunction |
getF2()
Returns mf2. |
double[] |
getX()
Returns the x values array. |
double[] |
getY()
Returns the y values array. |
void |
setF0(OneVariableFunction f0)
Sets f0(x). |
void |
setF1(OneVariableFunction f1)
Sets f1(x). |
void |
setF2(OneVariableFunction f2)
Sets f2(x). |
void |
setXY(double[] x,
double[] y)
Sets the x and y data arrays. |
| Methods inherited from class com.hedgehog.HObject |
|---|
clone, compare, compareTo, copy, equals, getID, getName, hashCode, hasID, hasName, setID, setName |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected double[] mx
protected double[] my
protected OneVariableFunction mf0
protected OneVariableFunction mf1
protected OneVariableFunction mf2
| Constructor Detail |
|---|
public TripleFunctionCurveFit(double[] x,
double[] y,
OneVariableFunction f0,
OneVariableFunction f1,
OneVariableFunction f2)
throws java.lang.IllegalArgumentException
x - x values.y - y values.f0 - Function f0(x).f1 - Function f1(x).f2 - Function f2(x).
java.lang.IllegalArgumentException - Thrown if x or y is null or x.length!=y.length. Thrown if f0, f1 or f2 are null.public TripleFunctionCurveFit(TripleFunctionCurveFit object)
object - Object to copy.| Method Detail |
|---|
public double[] getX()
public double[] getY()
public void setXY(double[] x,
double[] y)
throws java.lang.IllegalArgumentException
x - x values.y - y values.
java.lang.IllegalArgumentException - Thrown if x or y is null or x.length!=y.length.public OneVariableFunction getF0()
public OneVariableFunction getF1()
public OneVariableFunction getF2()
public void setF0(OneVariableFunction f0)
throws java.lang.IllegalArgumentException
f0 - New OneVariableFunction object mf0.
java.lang.IllegalArgumentException - Thrown if f0 is null.
public void setF1(OneVariableFunction f1)
throws java.lang.IllegalArgumentException
f1 - New OneVariableFunction object mf1.
java.lang.IllegalArgumentException - Thrown if f1 is null.
public void setF2(OneVariableFunction f2)
throws java.lang.IllegalArgumentException
f2 - New OneVariableFunction object mf2.
java.lang.IllegalArgumentException - Thrown if f2 is null.
public double[] fit(java.lang.Object f0InvokingObject,
java.lang.Object f1InvokingObject,
java.lang.Object f2InvokingObject)
f0InvokingObject - Invoking object for mf0.f1InvokingObject - Invoking object for mf1.f2InvokingObject - Invoking object for mf2.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||