public class CoordinateMatrix extends Object implements DistributedMatrix
Constructor and Description |
---|
CoordinateMatrix(RDD<MatrixEntry> entries)
Alternative constructor leaving matrix dimensions to be determined automatically.
|
CoordinateMatrix(RDD<MatrixEntry> entries,
long nRows,
long nCols) |
Modifier and Type | Method and Description |
---|---|
RDD<MatrixEntry> |
entries() |
long |
numCols()
Gets or computes the number of columns.
|
long |
numRows()
Gets or computes the number of rows.
|
IndexedRowMatrix |
toIndexedRowMatrix()
Converts to IndexedRowMatrix.
|
RowMatrix |
toRowMatrix()
Converts to RowMatrix, dropping row indices after grouping by row index.
|
public CoordinateMatrix(RDD<MatrixEntry> entries, long nRows, long nCols)
public CoordinateMatrix(RDD<MatrixEntry> entries)
public RDD<MatrixEntry> entries()
public long numCols()
numCols
in interface DistributedMatrix
public long numRows()
numRows
in interface DistributedMatrix
public IndexedRowMatrix toIndexedRowMatrix()
public RowMatrix toRowMatrix()