Skip to content

Commit

Permalink
revert some code
Browse files Browse the repository at this point in the history
  • Loading branch information
yinxusen committed Jul 8, 2016
1 parent 2f879e2 commit c28fdb8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private static void rowMatrixExample() {
Vector v3 = Vectors.dense(3.0, 30.0, 300.0);

// a JavaRDD of local vectors
JavaRDD<Vector> rows = jsc.parallelize(Arrays.asList(v1, v2, v3), 1);
JavaRDD<Vector> rows = jsc.parallelize(Arrays.asList(v1, v2, v3));

// Create a RowMatrix from an JavaRDD<Vector>.
RowMatrix mat = new RowMatrix(rows.rdd());
Expand Down Expand Up @@ -189,7 +189,7 @@ private static void blockMatrixExample() {
MatrixEntry me2 = new MatrixEntry(1, 0, 2.1);
MatrixEntry me3 = new MatrixEntry(6, 1, 3.7);

// a JavaRDD of (i, j, v) Matrix Entries
// A JavaRDD of (i, j, v) Matrix Entries
JavaRDD<MatrixEntry> entries = jsc.parallelize(Arrays.asList(me1, me2, me3));

// Create a CoordinateMatrix from a JavaRDD<MatrixEntry>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ object DataTypesExamples {
val v2 = Vectors.dense(2.0, 20.0, 200.0)
val v3 = Vectors.dense(3.0, 30.0, 300.0)

val rows: RDD[Vector] = sc.parallelize(Seq(v1, v2, v3), 1) // an RDD of local vectors
val rows: RDD[Vector] = sc.parallelize(Seq(v1, v2, v3)) // an RDD of local vectors
// Create a RowMatrix from an RDD[Vector].
val mat: RowMatrix = new RowMatrix(rows)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class RowMatrix @Since("1.0.0") (

/** Alternative constructor leaving matrix dimensions to be determined automatically. */
@Since("1.0.0")
def this(rows: RDD[Vector]) = this(rows.retag(classOf[Vector]), 0L, 0)
def this(rows: RDD[Vector]) = this(rows, 0L, 0)

/** Gets or computes the number of columns. */
@Since("1.0.0")
Expand Down

0 comments on commit c28fdb8

Please sign in to comment.