org.apache.spark.mllib.linalg.distributed
Class CoordinateMatrix

Object
  extended by 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

Constructor Summary
CoordinateMatrix(RDD<MatrixEntry> entries)
           
CoordinateMatrix(RDD<MatrixEntry> entries, long nRows, long nCols)
           
 
Method Summary
 RDD<MatrixEntry> entries()
           
 long numCols()
          Gets or computes the number of columns.
 long numRows()
          Gets or computes the number of rows.
 BlockMatrix toBlockMatrix()
           
 BlockMatrix toBlockMatrix(int rowsPerBlock, int colsPerBlock)
           
 IndexedRowMatrix toIndexedRowMatrix()
           
 RowMatrix toRowMatrix()
           
 CoordinateMatrix transpose()
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoordinateMatrix

public CoordinateMatrix(RDD<MatrixEntry> entries,
                        long nRows,
                        long nCols)

CoordinateMatrix

public CoordinateMatrix(RDD<MatrixEntry> entries)
Method Detail

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)