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.
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionVerticalDoubleDataBox(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 SummaryModifier and TypeMethodDescriptioncopy()copy.get(int row, int col) get.double[][]getVariableVectors.like()like.intnumCols()numCols.intnumRows()numRows.static BoxDataSetGenerates a simple exemplar of this class to test serialization.voidSets the value at the given row and column to the given Number.viewSelection(int[] rows, int[] cols) viewSelection.
- 
Constructor Details- 
VerticalDoubleDataBoxpublic VerticalDoubleDataBox(int rows, int cols) Constructs an 2D double array consisting entirely of missing values (Double.NaN).- Parameters:
- rows- a int
- cols- a int
 
- 
VerticalDoubleDataBoxpublic VerticalDoubleDataBox(double[][] data) Constructs a new data box using the given 2D double data array as data.- Parameters:
- data- an array of objects
 
- 
VerticalDoubleDataBoxCopies the data from the given data box into this one.- Parameters:
- dataBox- a- DataBoxobject
 
 
- 
- 
Method Details- 
serializableInstanceGenerates a simple exemplar of this class to test serialization.- Returns:
- a BoxDataSetobject
 
- 
numRowspublic int numRows()numRows. 
- 
numColspublic int numCols()numCols. 
- 
setSets the value at the given row and column to the given Number. This number may be interpreted differently depending on how values are stored. A value of null is interpreted as a missing value.Sets the value at the given row/column to the given Number value. The value used is number.doubleValue(). 
- 
getget. 
- 
getVariableVectorspublic double[][] getVariableVectors()getVariableVectors. - Returns:
- an array of objects
 
- 
copycopy. 
- 
likelike. 
- 
viewSelectionviewSelection. - Specified by:
- viewSelectionin interface- DataBox
- Parameters:
- rows- the row indices.
- cols- the column indices.
- Returns:
- this data box, restricted to the given rows and columns.
 
 
-