Skip to content
This repository has been archived by the owner on Nov 30, 2019. It is now read-only.

Commit

Permalink
added default toBlockMatrix conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
brkyvz committed Jan 29, 2015
1 parent 851f2a2 commit 66cb755
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ class CoordinateMatrix(
toIndexedRowMatrix().toRowMatrix()
}

/** Converts to BlockMatrix. Creates blocks of size 1024 x 1024. */
def toBlockMatrix(): BlockMatrix = {
toBlockMatrix(1024, 1024)
}

/**
* Converts to BlockMatrix.
* @param rowsPerBlock The number of rows of each block. The blocks at the bottom edge may have
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ class IndexedRowMatrix(
new RowMatrix(rows.map(_.vector), 0L, nCols)
}

/** Converts to BlockMatrix. Creates blocks of size 1024 x 1024. */
def toBlockMatrix(): BlockMatrix = {
toBlockMatrix(1024, 1024)
}

/**
* Converts to BlockMatrix.
* @param rowsPerBlock The number of rows of each block. The blocks at the bottom edge may have
Expand Down

0 comments on commit 66cb755

Please sign in to comment.