public class DataMatrix
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
DataMatrix(int rows,
int columns)
Instantiates a new memory block.
|
Modifier and Type | Method and Description |
---|---|
void |
and(int row,
int value)
ANDs the first value of the row with the given value
|
DataMatrix |
clone() |
void |
copyFrom(int row,
DataMatrix sourceMatrix,
int sourceRow)
Copies a row from the given matrix into this matrix
|
boolean |
equals(int row1,
int row2)
Compares two rows for equality
|
boolean |
equals(int row,
int[] data)
Returns whether the given row has the given data
|
boolean |
equalsIgnore(int row1,
int row2,
int ignore)
Internal equals
|
boolean |
equalsIgnoringOutliers(int row1,
int row2)
Equals ignoring outliers
|
int |
get(int row,
int col)
Returns the specified value
|
int |
getNumColumns()
Returns the number of columns
|
int |
getNumRows()
Returns the number of rows
|
int |
getValueAtColumn(int column)
Gets the value in the given column for the row which
has been set via setRow(row).
|
int |
hashCode(int row)
Returns an hashcode for the given row
|
int |
hashCode(int[] array)
Computes a hashcode for an integer array, partially unrolled.
|
int |
hashCodeIgnore(int row,
int ignore)
Returns an hashcode for the given row
|
boolean |
iterator_hasNext()
First iterator
|
int |
iterator_next()
First iterator
|
void |
iterator_write(int value)
First iterator
|
void |
iterator(int row)
First iterator
|
void |
or(int row,
int value)
ORs the first value of the row with the given value
|
void |
set(int row,
int column,
int value)
Sets a value
|
void |
setRow(int row)
Sets the row index for data access
|
void |
setRow(int row,
int[] data)
Sets the data for one row
|
void |
setValueAtColumn(int column,
int value)
Sets the value in the given column for the row which
has been set via setRow(row).
|
void |
swap(int row1,
int row2)
Swaps the data in both rows
|
public DataMatrix(int rows, int columns)
rows
- the num rowscolumns
- the num columnspublic void and(int row, int value)
row
- value
- public DataMatrix clone()
clone
in class java.lang.Object
public void copyFrom(int row, DataMatrix sourceMatrix, int sourceRow)
row
- sourceMatrix
- sourceRow
- public boolean equals(int row1, int row2)
row1
- row2
- public boolean equals(int row, int[] data)
row
- data
- public boolean equalsIgnore(int row1, int row2, int ignore)
row1
- row2
- ignore
- public boolean equalsIgnoringOutliers(int row1, int row2)
row1
- row2
- public int get(int row, int col)
row
- col
- public int getNumColumns()
public int getNumRows()
public int getValueAtColumn(int column)
column
- value
- public int hashCode(int row)
row
- public final int hashCode(int[] array)
array
- public int hashCodeIgnore(int row, int ignore)
row
- ignore
- public void iterator(int row)
row
- public boolean iterator_hasNext()
public int iterator_next()
public void iterator_write(int value)
value
- public void or(int row, int value)
row
- value
- public void set(int row, int column, int value)
row
- column
- value
- public void setRow(int row)
row
- public void setRow(int row, int[] data)
row
- data
- public void setValueAtColumn(int column, int value)
column
- value
- public void swap(int row1, int row2)
row1
- row2
-