Package edu.cmu.tetrad.data
Class VerticalDoubleDataBox
java.lang.Object
edu.cmu.tetrad.data.VerticalDoubleDataBox
- All Implemented Interfaces:
DataBox
,TetradSerializable
,Serializable
Stores a 2D array of double data.
- Author:
- josephramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionVerticalDoubleDataBox
(double[][] data) Constructs a new data box using the given 2D double data array as data.VerticalDoubleDataBox
(int rows, int cols) Constructs an 2D double array consisting entirely of missing values (Double.NaN).VerticalDoubleDataBox
(DataBox dataBox) Copies the data from the given data box into this one. -
Method Summary
Modifier and TypeMethodDescriptioncopy()
get
(int row, int col) double[][]
like()
int
numCols()
int
numRows()
static BoxDataSet
Generates a simple exemplar of this class to test serialization.void
Sets the value at the given row/column to the given Number value.viewSelection
(int[] rows, int[] cols)
-
Constructor Details
-
VerticalDoubleDataBox
public VerticalDoubleDataBox(int rows, int cols) Constructs an 2D double array consisting entirely of missing values (Double.NaN). -
VerticalDoubleDataBox
public VerticalDoubleDataBox(double[][] data) Constructs a new data box using the given 2D double data array as data. -
VerticalDoubleDataBox
Copies the data from the given data box into this one.
-
-
Method Details
-
serializableInstance
Generates a simple exemplar of this class to test serialization. -
numRows
public int numRows() -
numCols
public int numCols() -
set
Sets the value at the given row/column to the given Number value. The value used is number.doubleValue(). -
get
-
getVariableVectors
public double[][] getVariableVectors() -
copy
-
like
-
viewSelection
- Specified by:
viewSelection
in interfaceDataBox
- Returns:
- this data box, restricted to the given rows and columns.
-