public final class Int2D
extends java.lang.Object
| Constructor and Description |
|---|
Int2D(int rows,
int columns)
Construct a 2D int array with default data allocation.
|
Int2D(int rows,
int columns,
int[] data)
Construct a 2D int array with given data
|
| Modifier and Type | Method and Description |
|---|---|
int |
get(int r,
int c)
Gets the element at specified position
|
int |
getColumns() |
int |
getLength(int rank) |
int |
getRows() |
int |
length()
Gets the total length of this 2d array
|
void |
set(int r,
int c,
int v)
Sets the element at specified position
|
java.lang.String |
toString() |
public Int2D(int rows,
int columns)
rows - Number of rows of the 2D arraycolumns - Number of columns of the 2D arraypublic Int2D(int rows,
int columns,
int[] data)
rows - Number of rows of the 2D arraycolumns - Number of columns of the 2D arraydata - Array to wrap, Float2D will use this array internally.public int get(int r,
int c)
r - Rowc - Columnpublic void set(int r,
int c,
int v)
r - Rowc - Columnv - Valuepublic int length()
public int getRows()
public int getColumns()
public int getLength(int rank)
public java.lang.String toString()
toString in class java.lang.Object