public class DataStore
extends java.lang.Object
Constructor and Description |
---|
DataStore()
Constructor for the DataStore object
|
DataStore(double[] y,
double[][] x)
Constructor for the DataStore object with initial data
|
DataStore(double[] y,
double[] y_err,
double[][] x)
Constructor for the DataStore object with initial data
|
Modifier and Type | Method and 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 y_err,
double x)
Adds a record to the DataStore object
|
void |
addRecord(double y,
double y_err,
double[] x)
Adds a record to the DataStore object
|
void |
clear()
Removes all records
|
int |
detVarsNumber()
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 |
size()
Returns the numbers of records with (y,x_arr) pairs
|
public DataStore()
public DataStore(double[] y, double[][] x)
y
- The y-values arrayx
- The x-variables two-dimensional arraypublic DataStore(double[] y, double[] y_err, double[][] x)
y
- The y-values arrayy_err
- The y-errors values arrayx
- The x-variables two-dimensional arraypublic int size()
public int detVarsNumber()
public double getY(int i)
i
- The index of the recordpublic double getErrY(int i)
i
- The index of the recordpublic double[] getArrX(int i)
i
- The index of the recordpublic void clear()
public void addRecord(double y, double[] x)
y
- The y-valuex
- The independent values arraypublic void addRecord(double y, double x)
y
- The y-valuex
- The independent x valuepublic void addRecord(double y, double y_err, double[] x)
y
- The y-valuey_err
- The y_value errorx
- The independent values arraypublic void addRecord(double y, double y_err, double x)
y
- The y-valuey_err
- The y_value errorx
- The independent x value