Package edu.cmu.tetrad.data
Class VerticalIntDataBox
java.lang.Object
edu.cmu.tetrad.data.VerticalIntDataBox
- All Implemented Interfaces:
DataBox
,TetradSerializable
,Serializable
Stores a 2D array of int data. Note that the missing value marker for this box is -99.
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionVerticalIntDataBox
(int[][] data) Constructs a new data box using the given 2D int data array as data.VerticalIntDataBox
(int rows, int cols) Constructs an 2D int array consisting entirely of missing values (int.NaN).VerticalIntDataBox
(DataBox dataBox) Constructor for VerticalIntDataBox. -
Method Summary
Modifier and TypeMethodDescriptioncopy()
copy.get
(int row, int col) get.int[][]
getVariableVectors.like()
like.int
numCols()
numCols.int
numRows()
numRows.static BoxDataSet
Generates a simple exemplar of this class to test serialization.void
Sets the value at the given row and column to the given Number.viewSelection
(int[] rows, int[] cols) viewSelection.
-
Constructor Details
-
VerticalIntDataBox
public VerticalIntDataBox(int rows, int cols) Constructs an 2D int array consisting entirely of missing values (int.NaN).- Parameters:
rows
- a intcols
- a int
-
VerticalIntDataBox
public VerticalIntDataBox(int[][] data) Constructs a new data box using the given 2D int data array as data.- Parameters:
data
- an array of objects
-
VerticalIntDataBox
-
-
Method Details
-
serializableInstance
Generates a simple exemplar of this class to test serialization.- Returns:
- a
BoxDataSet
object
-
numRows
-
numCols
-
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.Sets the value at the given row/column to the given Number value. The value used is number.intValue().
-
get
-
getVariableVectors
public int[][] getVariableVectors()getVariableVectors.
- Returns:
- an array of objects
-
copy
-
like
-
viewSelection
viewSelection.
- Specified by:
viewSelection
in interfaceDataBox
- Parameters:
rows
- the row indices.cols
- the column indices.- Returns:
- this data box, restricted to the given rows and columns.
-