Package edu.cmu.tetrad.data
Interface DataBox
- All Superinterfaces:
- Serializable,- TetradSerializable
- All Known Implementing Classes:
- ByteDataBox,- DoubleDataBox,- FloatDataBox,- IntDataBox,- LongDataBox,- MixedDataBox,- ShortDataBox,- VerticalDoubleDataBox,- VerticalIntDataBox
Stores a 2D array of data. Different implementations may store data in different ways, allowing for space or time
 efficiency.
- Version:
- $Id: $Id
- Author:
- josephramsey
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final longConstantserialVersionUID=23L
- 
Method SummaryModifier and TypeMethodDescriptioncopy()copy.get(int row, int col) get.like()Returns a data box of the same dimensions as this one, without setting any values.intnumCols()numCols.intnumRows()numRows.voidSets the value at the given row and column to the given Number.viewSelection(int[] rows, int[] cols) viewSelection.
- 
Field Details- 
serialVersionUIDstatic final long serialVersionUIDConstantserialVersionUID=23L- See Also:
 
 
- 
- 
Method Details- 
numRowsint numRows()numRows. - Returns:
- the (fixed) number of rows of the dataset.
 
- 
numColsint numCols()numCols. - Returns:
- the (fixed) number of columns of the dataset.
 
- 
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.- Parameters:
- row- the row index.
- col- the column index.
- value- the value to store.
- Throws:
- IllegalArgumentException- if the given value cannot be stored (because it's out of range or cannot be converted or whatever).
 
- 
getget. - Parameters:
- row- the row index.
- col- the column index.
- Returns:
- the value at the given row and column as a Number. If the value is missing, null is uniformly returned.
 
- 
copyDataBox copy()copy. - Returns:
- a copy of this data box.
 
- 
viewSelectionviewSelection. - Parameters:
- rows- the row indices.
- cols- the column indices.
- Returns:
- this data box, restricted to the given rows and columns.
 
- 
likeDataBox like()Returns a data box of the same dimensions as this one, without setting any values.- Returns:
- a new data box.
 
 
-