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

Object
  extended by org.apache.spark.mllib.linalg.distributed.IndexedRowMatrix
All Implemented Interfaces:
java.io.Serializable, DistributedMatrix

public class IndexedRowMatrix
extends Object
implements DistributedMatrix

See Also:
Serialized Form

Constructor Summary
IndexedRowMatrix(RDD<IndexedRow> rows)
           
IndexedRowMatrix(RDD<IndexedRow> rows, long nRows, int nCols)
           
 
Method Summary
 Matrix computeGramianMatrix()
           
 SingularValueDecomposition<IndexedRowMatrix,Matrix> computeSVD(int k, boolean computeU, double rCond)
           
 IndexedRowMatrix multiply(Matrix B)
           
 long numCols()
          Gets or computes the number of columns.
 long numRows()
          Gets or computes the number of rows.
 RDD<IndexedRow> rows()
           
 BlockMatrix toBlockMatrix()
           
 BlockMatrix toBlockMatrix(int rowsPerBlock, int colsPerBlock)
           
 CoordinateMatrix toCoordinateMatrix()
           
 RowMatrix toRowMatrix()
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexedRowMatrix

public IndexedRowMatrix(RDD<IndexedRow> rows,
                        long nRows,
                        int nCols)

IndexedRowMatrix

public IndexedRowMatrix(RDD<IndexedRow> rows)
Method Detail

rows

public RDD<IndexedRow> rows()

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

toRowMatrix

public RowMatrix toRowMatrix()

toBlockMatrix

public BlockMatrix toBlockMatrix()

toBlockMatrix

public BlockMatrix toBlockMatrix(int rowsPerBlock,
                                 int colsPerBlock)

toCoordinateMatrix

public CoordinateMatrix toCoordinateMatrix()

computeSVD

public SingularValueDecomposition<IndexedRowMatrix,Matrix> computeSVD(int k,
                                                                      boolean computeU,
                                                                      double rCond)

multiply

public IndexedRowMatrix multiply(Matrix B)

computeGramianMatrix

public Matrix computeGramianMatrix()