|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.genepattern.data.matrix.IntMatrix2D
A dense 2-dimensional matrix holding int elements.
| Constructor Summary | |
IntMatrix2D(int[][] matrix)
Creates a new matrix |
|
IntMatrix2D(int rows,
int columns)
Creates a new matrix |
|
| Method Summary | |
int |
get(int row,
int column)
Gets a single element |
int[][] |
getArray()
Gets the underlying int[][] array |
int |
getColumnCount()
Gets the column dimension. |
int[] |
getRow(int row)
Gets the underlying array at the given row |
int |
getRowCount()
Gets the row dimension. |
void |
set(int rowIndex,
int columnIndex,
int value)
Sets a single element. |
IntMatrix2D |
slice(int[] rowIndices,
int[] columnIndices)
Constructs and returns a new matrix that contains the indicated cells. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public IntMatrix2D(int rows,
int columns)
rows - The number of rows.columns - The number of columns.public IntMatrix2D(int[][] matrix)
matrix - the data| Method Detail |
public int[][] getArray()
public int[] getRow(int row)
row - Row index
public IntMatrix2D slice(int[] rowIndices,
int[] columnIndices)
rowIndices - The rows of the cells in the new matrix. To indicate that the
new matrix should contain all rows, set this parameter to
null.columnIndices - The columns of the cells in the new matrix. To indicate that
the new matrix should contain all columns, set this parameter
to null.
public void set(int rowIndex,
int columnIndex,
int value)
value - A(row,column).rowIndex - The row index.columnIndex - The column index.
public int get(int row,
int column)
row - Row index.column - Column index.
public int getRowCount()
public int getColumnCount()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||