numal.lowprecision
Interface Function

All Known Implementing Classes:
GaussianFit, TestMarquardt

public interface Function

Methods for computing the residual vector of a function, its jacobian matrix and several options accessor methods which control the behavior of AnalyticProblems.marquardt(int, int, float[], float[], float[][], numal.lowprecision.Function, float[]) to evaluate the properties of a given function f(x[i],par) with n parameters par over a set of point {x[i],y[i]) where i=1 to m.


Method Summary
 void computeJacobian(int m, int n, float[] parameter, float[] rv, float[][] jac)
          Get the partial derivatives jac[i][j] = drv[i]/dpar[j], obtained with the current values of the parameters.
 boolean computeResidualVector(int m, int n, float[] parameter, float[] rv)
          Get residual vector rv[i] = f(x[i],par) - y[i].
 float getAbsoluteTolerance()
          Absolute tolerance for the difference between the Euclidian norm of the ultimate and penultimate residual vector (value of epsilon_a) the process is terminated if the improvement of the sum of the squares is less than relativeTolerance*(sum of the squares)+absoluteTolerance*absoluteTolerance
 float[] getAnalyticValues(int m, float[] parameter)
          Get the analytic values of the function for the given set of parameters and for all abcissa.
 int getInvocations()
          Maximum allowed number of invocations of computeResidualVector(int, int, float[], float[])
 float getMachinePrecision()
          Machine precision
 float getRelativeTolerance()
          Relative tolerance for the difference between the Euclidian norm of the ultimate and penultimate residual vector (value of epsilon_re) (see absoluteTolerance)
 float getStartingValue()
          Starting value used for the relation between the gradient and the Gauss-Newton direction (value of ξ); if the problem is well conditioned then a suitable value for startingValue will be 0.01; if the problem is ill conditioned then startingValue should be greater, but the value of startingValue must satisfy : machinePrecision < startingValue ≤ 1 / machinePrecision
 

Method Detail

getAnalyticValues

float[] getAnalyticValues(int m,
                          float[] parameter)
Get the analytic values of the function for the given set of parameters and for all abcissa.

Parameters:
m - number of sample points used in the fitting
parameter - an array of function parameters
Returns:
the value of this function for all abcissa and parameters

computeResidualVector

boolean computeResidualVector(int m,
                              int n,
                              float[] parameter,
                              float[] rv)
Get residual vector rv[i] = f(x[i],par) - y[i]. POSTCONDITION: parameter array must not be altered.

Parameters:
m - number of sample points used in the fitting
n - number of parameters, must be less than or equal to m
parameter - input: current values of parameters (shouldn't be altered by funct)
rv - output: residual vector obtained with current value of parameters; i.e f(x[i],par) - y[i]
Returns:
true when successful, false if current estimates of parameters lie outside a feasible region (invoker can avoid residual vector calculations on values which may make no sense or even cause overflow)

computeJacobian

void computeJacobian(int m,
                     int n,
                     float[] parameter,
                     float[] rv,
                     float[][] jac)
Get the partial derivatives jac[i][j] = drv[i]/dpar[j], obtained with the current values of the parameters. The precision of this method in computing the elements of jac must be at least the precision defined by in[3] and in[4] of AnalyticProblems.marquardt(int, int, float[], float[], float[][], numal.lowprecision.Function, float[]). POSTCONDITION: parameter array must not be altered.

Parameters:
m - number of sample points used in the fitting
n - number of parameters, must be less than or equal to the number of sample points
parameter - input: current values of parameters
rv - output: residual vector obtained with current value of parameters; i.e f(x[i],parameter) - y[i]
jac - output: partial derivatives drv[i]/dparameter[j], obtained with the current values of the parameters

getInvocations

int getInvocations()
Maximum allowed number of invocations of computeResidualVector(int, int, float[], float[])


getMachinePrecision

float getMachinePrecision()
Machine precision


getRelativeTolerance

float getRelativeTolerance()
Relative tolerance for the difference between the Euclidian norm of the ultimate and penultimate residual vector (value of epsilon_re) (see absoluteTolerance)


getAbsoluteTolerance

float getAbsoluteTolerance()
Absolute tolerance for the difference between the Euclidian norm of the ultimate and penultimate residual vector (value of epsilon_a) the process is terminated if the improvement of the sum of the squares is less than relativeTolerance*(sum of the squares)+absoluteTolerance*absoluteTolerance


getStartingValue

float getStartingValue()
Starting value used for the relation between the gradient and the Gauss-Newton direction (value of ξ); if the problem is well conditioned then a suitable value for startingValue will be 0.01; if the problem is ill conditioned then startingValue should be greater, but the value of startingValue must satisfy : machinePrecision < startingValue ≤ 1 / machinePrecision