QR class Null safety

QR Decomposition. For an m-by-n matrix A with m >= n, the QR decomposition is an m-by-n orthogonal matrix Q and an n-by-n upper triangular matrix R so that A = Q*R. The QR decompostion always exists, even if the matrix does not have full rank, so the constructor will never fail. The primary use of the QR decomposition is in the least squares solution of nonsquare systems of simultaneous linear equations. This will fail if isFullRank() returns false.


  1. "QR Decomposition". https://en.wikipedia.org/wiki/QR_decomposition. Retrieved 2019-07-17.
  2. "Jama". https://math.nist.gov/javanumerics/jama/. Retrieved 2019-07-17.
  3. "QR Decomposition Algorithms". https://rosettacode.org/wiki/QR_decomposition#Java. Retrieved 2019-07-17.
  4. "numpy.linalg.qr". https://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.qr.html. Retrieved 2019-07-17.


var qr = QR(Array2d([
   Array([4.0, 2.0, 1.0]),
   Array([16.0, 4.0, 1.0]),
   Array([64.0, 8.0, 1.0])
var q = qr.Q();
var r = qr.R();


QR(Array2d A)
QR Decomposition, computed by Householder reflections. Structure to access R and the Householder vectors and compute Q. A Rectangular matrix


hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


H() Array2d
Return the Householder vectors return Lower trapezoidal matrix whose columns define the reflections
isFullRank() bool
Is the matrix full rank? return true if R, and hence A, has full rank.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
Q() Array2d
Generate and return the (economy-sized) orthogonal factor Q
R() Array2d
Return the upper triangular factor R
solve(Array2d B) Array2d
Least squares solution of AX = B B A Matrix with as many rows as A and any number of columns. return X that minimizes the two norm of QR*X-B.
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]