Struct linxal::factorization::qr::QRFactors
[−]
[src]
pub struct QRFactors<T: QR> { /* fields omitted */ }
Representation of the components Q, R of the factorization of matrix A.
Methods
impl<T: QR> QRFactors<T>
[src]
fn rows(&self) -> usize
Return the number of rows in the original matrix
fn cols(&self) -> usize
Return the number of columns in the original matrix
fn qk<K: Into<Option<usize>>>(&self, k: K) -> Result<Array<T, Ix2>, QRError>
Return the first k
columns of the matrix Q of the QR
factorization.
Q
is generated such that the columns of Q
form an
orthogonal basis for the first k
columns of A
.
When k
is None, compute enough columns (min(m, n)
) to
faithfully recreate the original matrix A.
fn q(&self) -> Array<T, Ix2>
Return the m
by min(m, n)
matrix Q
.
Equivalent to self.qk(None)
.
self.q()
is large enough so that &self.q() * &self.r()
will faithfully reproduce the original matrix A
.
fn rk<K: Into<Option<usize>>>(&self, k: K) -> Result<Array<T, Ix2>, QRError>
Return the first 'k' rows of the matrix R of the QR factorization.
When k
is None, compute enough rows (min(m, n)
) to
faithfully recreate the original matrix A.
fn r(&self) -> Array<T, Ix2>
Return the first min(m, n)
by n
matrix R of the QR
factorization.
Equivalent to self::rk(None)
.
self.r()
is large enough so that &self.q() * &self.r()
will faithfully reproduce the original matrix A
.
fn reconstruct(&self) -> Array<T, Ix2>
Reconstruct the original matrix A
from the factorization.