Skip to content

Commit a85262a

Browse files
committed
rename RDDMatrixRow to IndexedRDDMatrixRow
1 parent b8b6ac3 commit a85262a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

mllib/src/main/scala/org/apache/spark/mllib/linalg/rdd/CoordinateRDDMatrix.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class CoordinateRDDMatrix(
6666
val indexedRows = entries.map(entry => (entry.i, (entry.j.toInt, entry.value)))
6767
.groupByKey()
6868
.map { case (i, vectorEntries) =>
69-
RDDMatrixRow(i, Vectors.sparse(n, vectorEntries))
69+
IndexedRDDMatrixRow(i, Vectors.sparse(n, vectorEntries))
7070
}
7171
new IndexedRowRDDMatrix(indexedRows, numRows(), numCols())
7272
}

mllib/src/main/scala/org/apache/spark/mllib/linalg/rdd/RDDMatrixRow.scala renamed to mllib/src/main/scala/org/apache/spark/mllib/linalg/rdd/IndexedRDDMatrixRow.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ package org.apache.spark.mllib.linalg.rdd
2020
import org.apache.spark.mllib.linalg.Vector
2121

2222
/** Represents a row of RowRDDMatrix. */
23-
case class RDDMatrixRow(index: Long, vector: Vector)
23+
case class IndexedRDDMatrixRow(index: Long, vector: Vector)

mllib/src/main/scala/org/apache/spark/mllib/linalg/rdd/IndexedRowRDDMatrix.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import org.apache.spark.rdd.RDD
2727
* @param n number of cols, where a negative number means unknown
2828
*/
2929
class IndexedRowRDDMatrix(
30-
val rows: RDD[RDDMatrixRow],
30+
val rows: RDD[IndexedRDDMatrixRow],
3131
m: Long = -1L,
3232
n: Long = -1L) extends RDDMatrix {
3333

@@ -49,8 +49,8 @@ class IndexedRowRDDMatrix(
4949
_m
5050
}
5151

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

0 commit comments

Comments
 (0)