Package xal.extension.fit.lsm
Interface ModelFunction
- All Known Implementing Classes:
ModelFunction1D
public interface ModelFunction
This interface define a model function and its partial derivatives that will
be used in the linear least square method. Users have to implement this
interface to use LSM solver from this package.
- Author:
- shishlo
-
Method Summary
Modifier and TypeMethodDescriptiondouble
getDerivative
(double[] x, double[] a, int aIndex) Returns the partial derivative of the model function for the particular set of independent variables and parameters and the index of parameters for which the derivative is calculateddouble
getValue
(double[] x, double[] a) Returns the value of the model function for the particular set of independent variables and parameters
-
Method Details
-
getValue
double getValue(double[] x, double[] a) Returns the value of the model function for the particular set of independent variables and parameters- Parameters:
x
- The array with the set of independent variablesa
- The array with set of parameters that should be found- Returns:
- The value of the function
-
getDerivative
double getDerivative(double[] x, double[] a, int aIndex) Returns the partial derivative of the model function for the particular set of independent variables and parameters and the index of parameters for which the derivative is calculated- Parameters:
x
- The array with the set of independent variablesa
- The array with set of parameters that should be foundaIndex
- The index of parameters for which the derivative is calculated- Returns:
- The value of the function
-