Module: Matrix2DDoubleAlgebra

Included in:
DoubleMDMatrix2D
Defined in:
lib/colt/matrix/matrix2D_floating_algebra.rb

Instance Method Summary collapse

Instance Method Details

#qr(economy_size = true) ⇒ Object


Constructs and returns the QR-decomposition of the given matrix.




268
269
270
271
272
# File 'lib/colt/matrix/matrix2D_floating_algebra.rb', line 268

def qr(economy_size = true)
  result = @algebra.qr(@colt_matrix)
  [result.hasFullRank(), MDMatrix.from_colt_matrix(result.getQ(economy_size)),
   MDMatrix.from_colt_matrix(result.getR(economy_size))]
end