@@ -504,7 +504,7 @@ class RowMatrix(
504504 * Paul G. Constantine, David F. Gleich. "Tall and skinny QR factorizations in MapReduce
505505 * architectures" ([[http://dx.doi.org/10.1145/1996092.1996103 ]])
506506 *
507- * @param computeQ: whether to computeQ
507+ * @param computeQ whether to computeQ
508508 * @return QRDecomposition(Q, R), Q = null if computeQ = false.
509509 */
510510 def tallSkinnyQR (computeQ : Boolean = false ): QRDecomposition [RowMatrix , Matrix ] = {
@@ -522,14 +522,13 @@ class RowMatrix(
522522
523523 // combine the R part from previous results vertically into a tall matrix
524524 val combinedR = blockQRs.treeReduce{ (r1, r2) =>
525- val partialR = BDM .vertcat(r1, r2)
526- breeze.linalg.qr.reduced(partialR ).r
525+ val stackedR = BDM .vertcat(r1, r2)
526+ breeze.linalg.qr.reduced(stackedR ).r
527527 }
528- val breezeR = breeze.linalg.qr.reduced(combinedR).r.toDenseMatrix
529- val finalR = Matrices .fromBreeze(breezeR)
528+ val finalR = Matrices .fromBreeze(combinedR.toDenseMatrix)
530529 val finalQ = if (computeQ) {
531530 try {
532- val invR = inv(breezeR )
531+ val invR = inv(combinedR )
533532 this .multiply(Matrices .fromBreeze(invR))
534533 } catch {
535534 case err : MatrixSingularException =>
0 commit comments