vec_math
Class LevenbergMarquardt.SinusModel

java.lang.Object
  extended by vec_math.AbstractDataModel
      extended by vec_math.AbstractGradientModel
          extended by vec_math.LevenbergMarquardt.SinusModel
All Implemented Interfaces:
DataModel, GradientModel
Enclosing class:
LevenbergMarquardt

static final class LevenbergMarquardt.SinusModel
extends AbstractGradientModel


Nested Class Summary
 
Nested classes/interfaces inherited from class vec_math.AbstractDataModel
AbstractDataModel.Construct, AbstractDataModel.LocalM
 
Field Summary
 
Fields inherited from class vec_math.AbstractDataModel
sigma, x, y
 
Constructor Summary
protected LevenbergMarquardt.SinusModel(VectorG[] times, double[] y, double[] err)
           
 
Method Summary
 double evaluateModel(VectorG a, VectorG t)
          Evaluates the data model on a single point in the independant parameter space, normally the time.
 Matrix getGradientMatrix(VectorG a)
          Returns the gradient of the model for all measures.
 int getParameterCount()
          The number of model parameters should be less than the number of data points in the model, otherwise you fit a underdetermined problem.
 
Methods inherited from class vec_math.AbstractGradientModel
check, check, getNegativeChi2HalfGradient, getNegativeChi2HalfGradient, getPseudoHessian, getPseudoHessian, LevenbergMarquardtSolver
 
Methods inherited from class vec_math.AbstractDataModel
getChiSquareModel, getChiSquareModel, getLorentzianModel, getMeasureCount, getMeasurementErrors, getMeasures, getModel, getModel, getResiduals, getResiduals, getRms, getRobustModel, getTimes, getTotalErrors, LorentzianSolver, RobustSolver, SimplexSolver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface vec_math.DataModel
getMeasureCount, getMeasurementErrors, getMeasures, getModel, getResiduals, getTimes, getTotalErrors
 

Constructor Detail

LevenbergMarquardt.SinusModel

protected LevenbergMarquardt.SinusModel(VectorG[] times,
                                        double[] y,
                                        double[] err)
Method Detail

getParameterCount

public int getParameterCount()
Description copied from interface: DataModel
The number of model parameters should be less than the number of data points in the model, otherwise you fit a underdetermined problem.

Returns:
The number of parameters in the model. This equals the dimension of the input vector in DataModel.getModel(vec_math.VectorG).

evaluateModel

public double evaluateModel(VectorG a,
                            VectorG t)
Description copied from interface: DataModel
Evaluates the data model on a single point in the independant parameter space, normally the time. Note that the model can be evaluated also at times not identically to the measurement times.

Parameters:
a - The model parameters
t - The (one)dimensional vector of independant variables.

getGradientMatrix

public Matrix getGradientMatrix(VectorG a)
Description copied from interface: GradientModel
Returns the gradient of the model for all measures. The measure index is the row of the Matrix, the columns are the derivatives of the model with respect to the parameters. Thus, the Matrix.columns() equals DataModel.getParameterCount(), and Matrix.rows() equals DataModel.getMeasureCount().