Class DataStore

java.lang.Object
xal.extension.fit.lsm.DataStore

public class DataStore extends Object
The data container to use inside the solver
Author:
shishlo
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor for the DataStore object
    DataStore(double[] y, double[][] x)
    Constructor for the DataStore object with initial data
    DataStore(double[] y, double[] yErr, double[][] x)
    Constructor for the DataStore object with initial data
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addRecord(double y, double x)
    Adds a record to the DataStore object
    void
    addRecord(double y, double[] x)
    Adds a record to the DataStore object
    void
    addRecord(double y, double yErr, double x)
    Adds a record to the DataStore object
    void
    addRecord(double y, double yErr, double[] x)
    Adds a record to the DataStore object
    void
    Removes all records
    int
    Returns number of independent variables for this storage
    double[]
    getArrX(int i)
    Returns the array with x-values for the record with index i
    double
    getErrY(int i)
    Returns y error value for the record with index i
    double
    getY(int i)
    Returns y value for the record with index i
    int
    Returns the numbers of records with (y,x_arr) pairs

    Methods inherited from class java.lang.Object

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

    • DataStore

      public DataStore()
      Constructor for the DataStore object
    • DataStore

      public DataStore(double[] y, double[][] x)
      Constructor for the DataStore object with initial data
      Parameters:
      y - The y-values array
      x - The x-variables two-dimensional array
    • DataStore

      public DataStore(double[] y, double[] yErr, double[][] x)
      Constructor for the DataStore object with initial data
      Parameters:
      y - The y-values array
      yErr - The y-errors values array
      x - The x-variables two-dimensional array
  • Method Details

    • size

      public int size()
      Returns the numbers of records with (y,x_arr) pairs
      Returns:
      The numbers of records with (y,x_arr) pairs
    • detVarsNumber

      public int detVarsNumber()
      Returns number of independent variables for this storage
      Returns:
      The size of x_arr array
    • getY

      public double getY(int i)
      Returns y value for the record with index i
      Parameters:
      i - The index of the record
      Returns:
      The y value
    • getErrY

      public double getErrY(int i)
      Returns y error value for the record with index i
      Parameters:
      i - The index of the record
      Returns:
      The y error value
    • getArrX

      public double[] getArrX(int i)
      Returns the array with x-values for the record with index i
      Parameters:
      i - The index of the record
      Returns:
      The array with x-values
    • clear

      public void clear()
      Removes all records
    • addRecord

      public void addRecord(double y, double[] x)
      Adds a record to the DataStore object
      Parameters:
      y - The y-value
      x - The independent values array
    • addRecord

      public void addRecord(double y, double x)
      Adds a record to the DataStore object
      Parameters:
      y - The y-value
      x - The independent x value
    • addRecord

      public void addRecord(double y, double yErr, double[] x)
      Adds a record to the DataStore object
      Parameters:
      y - The y-value
      yErr - The y_value error
      x - The independent values array
    • addRecord

      public void addRecord(double y, double yErr, double x)
      Adds a record to the DataStore object
      Parameters:
      y - The y-value
      yErr - The y_value error
      x - The independent x value