|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnr.Mat_wrapper
public class Mat_wrapper
Implements a simple Mat based on a based on an external array. The underlying data is publicly available.
| Field Summary | |
|---|---|
double[][] |
data
the array underlying this Mat |
| Constructor Summary | |
|---|---|
Mat_wrapper(double[][] d)
Creates a new instance of Mat_array. |
|
| Method Summary | |
|---|---|
double[][] |
asArray()
get the data |
Mat |
copy()
return a copy of this, or some version that the user can manipulate at will. |
double |
get(int i,
int j)
get an individual element |
Vec |
getColumn(int j)
get a column |
Vec |
getRow(int i)
get a row |
void |
set(int i,
int j,
double d)
set an individual element |
int |
size()
the size of the matrix |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final double[][] data
| Constructor Detail |
|---|
public Mat_wrapper(double[][] d)
d - the array to use
java.lang.IndexOutOfBoundsException - if d is not a square array| Method Detail |
|---|
public double[][] asArray()
Mat
asArray in interface Matpublic Mat copy()
Mat
copy in interface Mat
public double get(int i,
int j)
Mat
get in interface Mati - the rowj - the column
public Vec getColumn(int j)
Mat
getColumn in interface Matj - the column
public Vec getRow(int i)
Mat
getRow in interface Mati - the row
public void set(int i,
int j,
double d)
Mat
set in interface Mati - the rowj - the columnd - the value to set it topublic int size()
Mat
size in interface Matpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||