public class BounceModel
extends java.lang.Object
Constructor and Description 

BounceModel(int num_data,
int deg,
double when_step)
constructor for n data points using polynomial of degree d
plus a Dirac delta in the acceleration (step in velocity) at time s
That is, data[t] will be fitted to
sum_i<=d param[i]*t**i for t 
Modifier and Type  Method and Description 

double[] 
first_deriv(BounceMatrix model_param,
double t)
return first derivatives at time t
The dimensionality of the returned array of doubles is the same as
the number of columns in the model_param Matrix
(that would be 2 for model_param returned by fit_xy()).

BounceParameters 
fit_xy(double[] xData,
double[] yData,
int start,
int index_step)
fit parameters for model to a window of (x,y) points
Returned result:
fitted paramters
returns null if fitting is not possible,
which can happen if
start, start+index_step, ..., start+(num_data1)*index_step
goes out of range for either data array
or xdata or ydata is Double.NaN for one of the specified points
Time t=0 corresponds to subscript "start"
Time t=1 to start+time_step

BounceParameters 
fit_xy(double[] xData,
double[] yData,
int start,
int index_step,
double initial_step_at,
double[] initial_step_size)
fit parameters for model to a window of (x,y) points, with a specified step
to be removed before fitting
Returned result:
fitted parameters, with record of extra step
returns null if fitting is not possible,
which can happen if
start, start+index_step, ..., start+(num_data1)*index_step
goes out of range for either data array
or xdata or ydata is Double.NaN for one of the specified points
Time t=0 corresponds to subscript "start"
Time t=1 to start+time_step

double 
getStepAt()
where is there a step?

double 
getStepAt(BounceMatrix model_param)
where is there a step?
If there is a step in a model which estimates time as well as size of step,
we need the model parameters to say where the step was fitted.

double[] 
getStepSize(BounceMatrix model_param)
return step size
The dimensionality of the returned array of doubles is the same as
the number of columns in the model_param Matrix
(that would be 2 for model_param returned by fit_xy()).

double[] 
second_deriv(BounceMatrix model_param,
double t)
return second derivatives at time t
The dimensionality of the returned array of doubles is the same as
the number of columns in the model_param Matrix
(that would be 2 for model_param returned by fit_xy()).

boolean 
usesStep()
return use_step

public BounceModel(int num_data, int deg, double when_step)
num_data
 deg
 when_step
 when step in velocity happenspublic double getStepAt()
public double getStepAt(BounceMatrix model_param)
model_param
 parameters from fitpublic BounceParameters fit_xy(double[] xData, double[] yData, int start, int index_step)
xData
 array of x valuesyData
 array of y valuesstart
 subscript of first (x,y) pair for windowindex_step
 increment between subscripts for subsequent data pointspublic BounceParameters fit_xy(double[] xData, double[] yData, int start, int index_step, double initial_step_at, double[] initial_step_size)
xData
 array of x valuesyData
 array of y valuesstart
 subscript of first (x,y) pair for windowindex_step
 increment between subscripts for subsequent data pointsinitial_step_at
 what time the predefined step happens 0<=tinitial_step_size
 public double[] first_deriv(BounceMatrix model_param, double t)
model_param
 parameter matrix as returned by a fit_xy callt
 what timepublic double[] second_deriv(BounceMatrix model_param, double t)
model_param
 parameter matrix as returned by a fit_xy callt
 what time step (t=0 corresponds to subscript
"start" in the fit_xy callpublic boolean usesStep()
public double[] getStepSize(BounceMatrix model_param)
model_param
 parameter matrix as returned by a fit_xy call