Class ModelFunction1D

java.lang.Object
xal.extension.fit.lsm.ModelFunction1D
All Implemented Interfaces:
ModelFunction

public abstract class ModelFunction1D extends Object implements ModelFunction
This is an abstract adapter class for a model function with one independent variable. It delegates calls of getValue and getDerivative methods of interface to the abstract methods with the same names and different signatures. The signatures are different in a very simple way. The array of independent variables is replaced by a simple double value.
Author:
shishlo
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final 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
    abstract double
    getDerivative(double x, double[] a, int aIndex)
    Returns the partial derivative of the model function for the particular value of independent variable and parameters and the index of parameters for which the derivative is calculated
    final double
    getValue(double[] x, double[] a)
    Returns the value of the model function for the particular set of independent variables and parameters
    abstract double
    getValue(double x, double[] a)
    Returns the value of the model function for the particular value of the independent variable and parameters

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ModelFunction1D

      public ModelFunction1D()
  • Method Details

    • getValue

      public abstract double getValue(double x, double[] a)
      Returns the value of the model function for the particular value of the independent variable and parameters
      Parameters:
      x - The value of independent variable
      a - The array with set of parameters that should be found
      Returns:
      The value of the function
    • getDerivative

      public abstract double getDerivative(double x, double[] a, int aIndex)
      Returns the partial derivative of the model function for the particular value of independent variable and parameters and the index of parameters for which the derivative is calculated
      Parameters:
      x - The value of independent variable
      a - The array with set of parameters that should be found
      aIndex - The index of parameters for which the derivative is calculated
      Returns:
      The value of the function
    • getValue

      public final double getValue(double[] x, double[] a)
      Returns the value of the model function for the particular set of independent variables and parameters
      Specified by:
      getValue in interface ModelFunction
      Parameters:
      x - The array with the set of independent variables
      a - The array with set of parameters that should be found
      Returns:
      The value of the function
    • getDerivative

      public final 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
      Specified by:
      getDerivative in interface ModelFunction
      Parameters:
      x - The array with the set of independent variables
      a - The array with set of parameters that should be found
      aIndex - The index of parameters for which the derivative is calculated
      Returns:
      The value of the function