public interface Matrix
extends scala.Serializable
| Modifier and Type | Method and Description |
|---|---|
double |
apply(int i,
int j)
Gets the (i, j)-th element.
|
breeze.linalg.Matrix<Object> |
asBreeze()
Converts to a breeze matrix.
|
Matrix |
asML()
Convert this matrix to the new mllib-local representation.
|
scala.collection.Iterator<Vector> |
colIter()
Returns an iterator of column vectors.
|
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 |
numActives()
Find the number of values stored explicitly.
|
int |
numCols()
Number of columns.
|
int |
numNonzeros()
Find the number of non-zero active values.
|
int |
numRows()
Number of rows.
|
scala.collection.Iterator<Vector> |
rowIter()
Returns an iterator of row vectors.
|
double[] |
toArray()
Converts to a dense array in column major.
|
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)
|
double apply(int i,
int j)
breeze.linalg.Matrix<Object> asBreeze()
Matrix asML()
scala.collection.Iterator<Vector> colIter()
Matrix copy()
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.int index(int i,
int j)
boolean isTransposed()
Matrix map(scala.Function1<Object,Object> f)
SparseMatrix.f - (undocumented)DenseMatrix multiply(DenseMatrix y)
Matrix-DenseMatrix multiplication.y - (undocumented)DenseVector multiply(DenseVector y)
Matrix-DenseVector multiplication. For binary compatibility.y - (undocumented)DenseVector multiply(Vector y)
Matrix-Vector multiplication.y - (undocumented)int numActives()
int numCols()
int numNonzeros()
int numRows()
scala.collection.Iterator<Vector> rowIter()
double[] toArray()
String toString()
toString in class ObjectString toString(int maxLines,
int maxLineWidth)
Matrix transpose()
Matrix instance sharing the same underlying data.void update(int i,
int j,
double v)
Matrix update(scala.Function1<Object,Object> f)
SparseMatrix.f - (undocumented)