Package com.irurueta.numerical.fitting
Class MultiDimensionLinearFitter
java.lang.Object
com.irurueta.numerical.fitting.Fitter
com.irurueta.numerical.fitting.MultiDimensionFitter
com.irurueta.numerical.fitting.MultiDimensionLinearFitter
- Direct Known Subclasses:
SvdMultiDimensionLinearFitter
Base class to fit provided multidimensional data (x1, x2, ..., y1, y2, ...)
to a function made of a linear combination of functions used as a basis
(i.e. f(x1, x2, ...) = a * f0(x1, x2, ...) + b * f1(x1, x2, ...) + ...).
Where f0, f1, ... is the function basis which ideally should be formed by
orthogonal functions.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected double[]
Array where results of function evaluations are storedEvaluator of functionsprotected int
Number of function basis used as a linear combination of functions being fittedFields inherited from class com.irurueta.numerical.fitting.MultiDimensionFitter
a, chisq, covar, ndat, sig, x, y
Fields inherited from class com.irurueta.numerical.fitting.Fitter
resultAvailable
-
Constructor Summary
ConstructorsModifierConstructorDescription(package private)
Constructorprotected
MultiDimensionLinearFitter
(com.irurueta.algebra.Matrix x, double[] y, double sig) Constructorprotected
MultiDimensionLinearFitter
(com.irurueta.algebra.Matrix x, double[] y, double[] sig) Constructorprotected
Constructorprotected
MultiDimensionLinearFitter
(LinearFitterMultiDimensionFunctionEvaluator evaluator, com.irurueta.algebra.Matrix x, double[] y, double sig) Constructorprotected
MultiDimensionLinearFitter
(LinearFitterMultiDimensionFunctionEvaluator evaluator, com.irurueta.algebra.Matrix x, double[] y, double[] sig) Constructor -
Method Summary
Modifier and TypeMethodDescriptionReturns function evaluator to evaluate function at a given point and obtain the evaluation of function basis at such pointprivate void
Internal method to set function evaluator to evaluate function at a given point and obtain the evaluation of function basis at such pointboolean
isReady()
Indicates whether provided instance has enough data to start the function fitting.void
Sets function evaluator to evaluate function at a given point and obtain the evaluation of function basis at such pointMethods inherited from class com.irurueta.numerical.fitting.MultiDimensionFitter
getA, getChisq, getCovar, getSig, getX, getY, setInputData, setInputData
Methods inherited from class com.irurueta.numerical.fitting.Fitter
fit, isResultAvailable
-
Field Details
-
evaluator
Evaluator of functions -
afunc
protected double[] afuncArray where results of function evaluations are stored -
ma
protected int maNumber of function basis used as a linear combination of functions being fitted
-
-
Constructor Details
-
MultiDimensionLinearFitter
MultiDimensionLinearFitter()Constructor -
MultiDimensionLinearFitter
protected MultiDimensionLinearFitter(com.irurueta.algebra.Matrix x, double[] y, double[] sig) Constructor- Parameters:
x
- input points x where a linear multidimensional function f(x1, x2, ...) = a * f0(x1, x2, ...) + b * f1(x1, x2, ...) + ...y
- result of evaluation of linear multidimensional function f(x1, x2, ...) at provided x pointssig
- standard deviations of each pair of points (x, y)- Throws:
IllegalArgumentException
- if provided matrix rows and arrays don't have the same length
-
MultiDimensionLinearFitter
protected MultiDimensionLinearFitter(com.irurueta.algebra.Matrix x, double[] y, double sig) Constructor- Parameters:
x
- input points x where a linear multidimensional function f(x1, x2, ...) = a * f0(x1, x2, ...) + b * f1(x1, x2, ...) + ...y
- result of evaluation of linear multidimensional function f(x1, x2, ...) at provided x pointssig
- standard deviation of all pair of points assuming that standard deviations are constant- Throws:
IllegalArgumentException
- if provided matrix rows and arrays don't have the same length
-
MultiDimensionLinearFitter
protected MultiDimensionLinearFitter(LinearFitterMultiDimensionFunctionEvaluator evaluator) throws FittingException Constructor- Parameters:
evaluator
- evaluator to evaluate function at provided point and obtain the evaluation of function basis at such point- Throws:
FittingException
- if evaluation fails
-
MultiDimensionLinearFitter
protected MultiDimensionLinearFitter(LinearFitterMultiDimensionFunctionEvaluator evaluator, com.irurueta.algebra.Matrix x, double[] y, double[] sig) throws FittingException Constructor- Parameters:
evaluator
- evaluator to evaluate function at provided point and obtain the evaluation of function basis at such pointx
- input points x where a linear multidimensional function f(x1, x2, ...) = a * f0(x1, x2, ...) + b * f1(x1, x2, ...) + ...y
- result of evaluation of linear multidimensional function f(x1, x2, ...) at provided x pointssig
- standard deviations of each pair of points (x, y)- Throws:
FittingException
- if evaluation failsIllegalArgumentException
- if provided matrix rows and arrays don't have the same length
-
MultiDimensionLinearFitter
protected MultiDimensionLinearFitter(LinearFitterMultiDimensionFunctionEvaluator evaluator, com.irurueta.algebra.Matrix x, double[] y, double sig) throws FittingException Constructor- Parameters:
evaluator
- evaluator to evaluate function at provided point and obtain the evaluation of function basis at such pointx
- input points x where a linear multidimensional function f(x1, x2, ...) = a * f0(x1, x2, ...) + b * f1(x1, x2, ...) + ...y
- result of evaluation of linear multidimensional function f(x1, x2, ...) at provided x pointssig
- standard deviation of all pair of points assuming that standard deviations are constant- Throws:
FittingException
- if evaluation failsIllegalArgumentException
- if provided matrix rows and arrays don't have the same length
-
-
Method Details
-
getFunctionEvaluator
Returns function evaluator to evaluate function at a given point and obtain the evaluation of function basis at such point- Returns:
- function evaluator
-
setFunctionEvaluator
public void setFunctionEvaluator(LinearFitterMultiDimensionFunctionEvaluator evaluator) throws FittingException Sets function evaluator to evaluate function at a given point and obtain the evaluation of function basis at such point- Parameters:
evaluator
- function evaluator- Throws:
FittingException
- if evaluation fails
-
internalSetFunctionEvaluator
private void internalSetFunctionEvaluator(LinearFitterMultiDimensionFunctionEvaluator evaluator) throws FittingException Internal method to set function evaluator to evaluate function at a given point and obtain the evaluation of function basis at such point- Parameters:
evaluator
- function evaluator- Throws:
FittingException
- if evaluation fails
-
isReady
public boolean isReady()Indicates whether provided instance has enough data to start the function fitting.
-