|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nr.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 arrayMethod Detail |
---|
public double[][] asArray()
Mat
asArray
in interface Mat
public Mat copy()
Mat
copy
in interface Mat
public double get(int i, int j)
Mat
get
in interface Mat
i
- the rowj
- the column
public Vec getColumn(int j)
Mat
getColumn
in interface Mat
j
- the column
public Vec getRow(int i)
Mat
getRow
in interface Mat
i
- the row
public void set(int i, int j, double d)
Mat
set
in interface Mat
i
- the rowj
- the columnd
- the value to set it topublic int size()
Mat
size
in interface Mat
public 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 |