|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Matrix
Trait for a local matrix.
Method Summary | |
---|---|
double |
apply(int i,
int j)
Gets the (i, j)-th element. |
Matrix |
copy()
Get a deep copy of the matrix. |
void |
foreachActive(scala.Function3<Object,Object,Object,scala.runtime.BoxedUnit> f)
Applies a function f to all the active elements of dense and sparse matrix. |
int |
index(int i,
int j)
Return the index for the (i, j)-th element in the backing array. |
boolean |
isTransposed()
Flag that keeps track whether the matrix is transposed or not. |
Matrix |
map(scala.Function1<Object,Object> f)
Map the values of this matrix using a function. |
DenseMatrix |
multiply(DenseMatrix y)
Convenience method for `Matrix`-`DenseMatrix` multiplication. |
DenseVector |
multiply(DenseVector y)
Convenience method for `Matrix`-`DenseVector` multiplication. |
DenseVector |
multiply(Vector y)
Convenience method for `Matrix`-`Vector` multiplication. |
int |
numCols()
Number of columns. |
int |
numRows()
Number of rows. |
double[] |
toArray()
Converts to a dense array in column major. |
breeze.linalg.Matrix<Object> |
toBreeze()
Converts to a breeze matrix. |
String |
toString()
A human readable representation of the matrix |
String |
toString(int maxLines,
int maxLineWidth)
A human readable representation of the matrix with maximum lines and width |
Matrix |
transpose()
Transpose the Matrix. |
Matrix |
update(scala.Function1<Object,Object> f)
Update all the values of this matrix using the function f. |
void |
update(int i,
int j,
double v)
Update element at (i, j) |
Method Detail |
---|
int numRows()
int numCols()
boolean isTransposed()
double[] toArray()
breeze.linalg.Matrix<Object> toBreeze()
double apply(int i, int j)
int index(int i, int j)
void update(int i, int j, double v)
Matrix copy()
Matrix transpose()
DenseMatrix multiply(DenseMatrix y)
DenseVector multiply(DenseVector y)
DenseVector multiply(Vector y)
String toString()
toString
in class Object
String toString(int maxLines, int maxLineWidth)
Matrix map(scala.Function1<Object,Object> f)
f
- (undocumented)
SparseMatrix
.Matrix update(scala.Function1<Object,Object> f)
f
- (undocumented)
SparseMatrix
.void foreachActive(scala.Function3<Object,Object,Object,scala.runtime.BoxedUnit> f)
f
to all the active elements of dense and sparse matrix. The ordering
of the elements are not defined.
f
- the function takes three parameters where the first two parameters are the row
and column indices respectively with the type Int
, and the final parameter is the
corresponding value in the matrix with type Double
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |