Skip to content

Commit

Permalink
rename RDDMatrixRow to IndexedRDDMatrixRow
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxr committed Apr 2, 2014
1 parent b8b6ac3 commit a85262a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class CoordinateRDDMatrix(
val indexedRows = entries.map(entry => (entry.i, (entry.j.toInt, entry.value)))
.groupByKey()
.map { case (i, vectorEntries) =>
RDDMatrixRow(i, Vectors.sparse(n, vectorEntries))
IndexedRDDMatrixRow(i, Vectors.sparse(n, vectorEntries))
}
new IndexedRowRDDMatrix(indexedRows, numRows(), numCols())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ package org.apache.spark.mllib.linalg.rdd
import org.apache.spark.mllib.linalg.Vector

/** Represents a row of RowRDDMatrix. */
case class RDDMatrixRow(index: Long, vector: Vector)
case class IndexedRDDMatrixRow(index: Long, vector: Vector)
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import org.apache.spark.rdd.RDD
* @param n number of cols, where a negative number means unknown
*/
class IndexedRowRDDMatrix(
val rows: RDD[RDDMatrixRow],
val rows: RDD[IndexedRDDMatrixRow],
m: Long = -1L,
n: Long = -1L) extends RDDMatrix {

Expand All @@ -49,8 +49,8 @@ class IndexedRowRDDMatrix(
_m
}

/** Drops row indices and converts this to a RowRDDMatrix. */
def compressRows(): RowRDDMatrix = {
/** Drops row indices and converts this matrix to a RowRDDMatrix. */
def toRowRDDMatrix(): RowRDDMatrix = {
new RowRDDMatrix(rows.map(_.vector), -1, _n)
}
}

0 comments on commit a85262a

Please sign in to comment.