Package edu.cmu.tetrad.data
Class IntDataBox
java.lang.Object
edu.cmu.tetrad.data.IntDataBox
- All Implemented Interfaces:
DataBox
,TetradSerializable
,Serializable
Stores a 2D array of integer data. Note that the missing value marker for this box is -99.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionIntDataBox
(int[][] data) Constructs a new data box using the given 2D short data array as data.IntDataBox
(int rows, int cols) Constructs an 2D short array consisting entirely of missing values (-99). -
Method Summary
Modifier and TypeMethodDescriptioncopy()
get
(int row, int col) int[][]
getData()
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
-
IntDataBox
public IntDataBox(int rows, int cols) Constructs an 2D short array consisting entirely of missing values (-99). -
IntDataBox
public IntDataBox(int[][] data) Constructs a new data box using the given 2D short data array as data.
-
-
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.shortValue(). -
get
-
copy
-
like
-
viewSelection
- Specified by:
viewSelection
in interfaceDataBox
- Returns:
- this data box, restricted to the given rows and columns.
-
getData
public int[][] getData()
-