org.apache.spark.mllib.linalg.distributed
Class CoordinateMatrix
Object
org.apache.spark.mllib.linalg.distributed.CoordinateMatrix
- All Implemented Interfaces:
- java.io.Serializable, DistributedMatrix
public class CoordinateMatrix
- extends Object
- implements DistributedMatrix
- See Also:
- Serialized Form
Methods inherited from class Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CoordinateMatrix
public CoordinateMatrix(RDD<MatrixEntry> entries,
long nRows,
long nCols)
CoordinateMatrix
public CoordinateMatrix(RDD<MatrixEntry> entries)
entries
public RDD<MatrixEntry> entries()
numCols
public long numCols()
- Description copied from interface:
DistributedMatrix
- Gets or computes the number of columns.
- Specified by:
numCols
in interface DistributedMatrix
numRows
public long numRows()
- Description copied from interface:
DistributedMatrix
- Gets or computes the number of rows.
- Specified by:
numRows
in interface DistributedMatrix
transpose
public CoordinateMatrix transpose()
toIndexedRowMatrix
public IndexedRowMatrix toIndexedRowMatrix()
toRowMatrix
public RowMatrix toRowMatrix()
toBlockMatrix
public BlockMatrix toBlockMatrix()
toBlockMatrix
public BlockMatrix toBlockMatrix(int rowsPerBlock,
int colsPerBlock)