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.
- Author:
- josephramsey
-
Field Summary
Fields -
Method Summary
-
Field Details
-
serialVersionUID
static final long serialVersionUID- See Also:
-
-
Method Details
-
numRows
int numRows()- Returns:
- the (fixed) number of rows of the dataset.
-
numCols
int numCols()- Returns:
- the (fixed) number of columns of the dataset.
-
set
Sets 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.- Throws:
IllegalArgumentException
- if the given value cannot be stored (because it's out of range or cannot be converted or whatever).
-
get
- Returns:
- the value at the given row and column as a Number. If the value is missing, null is uniformly returned.
-
copy
DataBox copy()- Returns:
- a copy of this data box.
-
viewSelection
- Returns:
- this data box, restricted to the given rows and columns.
-
like
DataBox like()
-