vec_math
Class PhaseRegression.PhaseModel

java.lang.Object
  extended by vec_math.AbstractDataModel
      extended by vec_math.PhaseRegression.PhaseModel
All Implemented Interfaces:
DataModel
Enclosing class:
PhaseRegression

private static class PhaseRegression.PhaseModel
extends AbstractDataModel

Our data model.


Nested Class Summary
 
Nested classes/interfaces inherited from class vec_math.AbstractDataModel
AbstractDataModel.Construct, AbstractDataModel.LocalM
 
Field Summary
private  double omega
          The period, fixed.
 
Fields inherited from class vec_math.AbstractDataModel
sigma, x, y
 
Constructor Summary
private PhaseRegression.PhaseModel(VectorG t, VectorG y)
           
private PhaseRegression.PhaseModel(VectorG t, VectorG y, double p)
           
private PhaseRegression.PhaseModel(VectorG t, VectorG y, VectorG err, double p)
           
 
Method Summary
 double evaluateModel(VectorG amp, VectorG t)
          We convert the model vector into a.0+a.1*cos(2pi/P*(t.0-a.2))
 double[] getModel(VectorG amp)
          We convert the model vector into a.0+a.1*cos(2pi/P*(t-a.2))
 int getParameterCount()
          Return 3.
 void setPeriod(double p)
          Sets the period.
private static VectorG[] shovel(VectorG t)
          Converts a VectorG into a Vector1D[]
 
Methods inherited from class vec_math.AbstractDataModel
getChiSquareModel, getChiSquareModel, getLorentzianModel, getMeasureCount, getMeasurementErrors, getMeasures, 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
 

Field Detail

omega

private double omega
The period, fixed. Values below zero indicates invalid.

Constructor Detail

PhaseRegression.PhaseModel

private PhaseRegression.PhaseModel(VectorG t,
                                   VectorG y)

PhaseRegression.PhaseModel

private PhaseRegression.PhaseModel(VectorG t,
                                   VectorG y,
                                   double p)

PhaseRegression.PhaseModel

private PhaseRegression.PhaseModel(VectorG t,
                                   VectorG y,
                                   VectorG err,
                                   double p)
Method Detail

shovel

private static final VectorG[] shovel(VectorG t)
Converts a VectorG into a Vector1D[]


setPeriod

public void setPeriod(double p)
Sets the period.


getParameterCount

public int getParameterCount()
Return 3.

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

getModel

public double[] getModel(VectorG amp)
We convert the model vector into a.0+a.1*cos(2pi/P*(t-a.2))

Specified by:
getModel in interface DataModel
Overrides:
getModel in class AbstractDataModel
Parameters:
amp - The model parameters
Returns:
A model for the data points depending on the model parameters.

evaluateModel

public double evaluateModel(VectorG amp,
                            VectorG t)
We convert the model vector into a.0+a.1*cos(2pi/P*(t.0-a.2))

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