Qr

Struct Qr 

Source
pub struct Qr<T> { /* private fields */ }
Expand description

$QR$ decomposition

Implementations§

Source§

impl<T: ComplexField> Qr<T>

Source

pub fn new<C: Conjugate<Canonical = T>>(A: MatRef<'_, C>) -> Self

returns the $QR$ decomposition of $A$

Source

pub fn Q_basis(&self) -> MatRef<'_, T>

returns the householder basis of $Q$

Source

pub fn Q_coeff(&self) -> MatRef<'_, T>

returns the householder coefficients of $Q$

Source

pub fn R(&self) -> MatRef<'_, T>

returns the factor $R$

Source

pub fn thin_R(&self) -> MatRef<'_, T>

returns the upper trapezoidal part of $R$

Source

pub fn compute_Q(&self) -> Mat<T>

computes the factor $Q$

Source

pub fn compute_thin_Q(&self) -> Mat<T>

computes the first $\min(\text{nrows}, \text{ncols})$ columns of the factor $Q$

Trait Implementations§

Source§

impl<T: Clone> Clone for Qr<T>

Source§

fn clone(&self) -> Qr<T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug> Debug for Qr<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: ComplexField> DenseSolveCore<T> for Qr<T>

Source§

fn reconstruct(&self) -> Mat<T>

returns an approximation of the matrix that was used to create the decomposition
Source§

fn inverse(&self) -> Mat<T>

returns an approximation of the inverse of the matrix that was used to create the decomposition
Source§

impl<T: ComplexField> ShapeCore for Qr<T>

Source§

fn nrows(&self) -> usize

returns the number of rows of the matrix
Source§

fn ncols(&self) -> usize

returns the number of columns of the matrix
Source§

impl<T: ComplexField> SolveCore<T> for Qr<T>

Source§

fn solve_in_place_with_conj(&self, conj: Conj, rhs: MatMut<'_, T>)

solves the equation self × x = rhs, implicitly conjugating self if needed, and stores the result in rhs
Source§

fn solve_transpose_in_place_with_conj(&self, conj: Conj, rhs: MatMut<'_, T>)

solves the equation self.transpose() × x = rhs, implicitly conjugating self if needed, and stores the result in rhs
Source§

impl<T: ComplexField> SolveLstsqCore<T> for Qr<T>

Source§

fn solve_lstsq_in_place_with_conj(&self, conj: Conj, rhs: MatMut<'_, T>)

solves the equation self × x = rhs in the sense of least squares, implicitly conjugating self if needed, and stores the result in the top rows of rhs

Auto Trait Implementations§

§

impl<T> Freeze for Qr<T>

§

impl<T> RefUnwindSafe for Qr<T>
where T: RefUnwindSafe,

§

impl<T> Send for Qr<T>
where T: Send,

§

impl<T> Sync for Qr<T>
where T: Sync,

§

impl<T> Unpin for Qr<T>
where T: Unpin,

§

impl<T> UnwindSafe for Qr<T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ByRef<T> for T

Source§

fn by_ref(&self) -> &T

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DistributionExt for T
where T: ?Sized,

Source§

fn rand<T>(&self, rng: &mut (impl ?Sized + Rng)) -> T
where Self: Distribution<T>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, S> Solve<T> for S
where T: ComplexField, S: SolveCore<T> + ?Sized,

Source§

fn solve_in_place(&self, rhs: impl AsMatMut<T = T, Rows = usize>)

solves $A x = b$
Source§

fn solve_conjugate_in_place(&self, rhs: impl AsMatMut<T = T, Rows = usize>)

solves $\bar A x = b$
Source§

fn solve_transpose_in_place(&self, rhs: impl AsMatMut<T = T, Rows = usize>)

solves $A^\top x = b$
Source§

fn solve_adjoint_in_place(&self, rhs: impl AsMatMut<T = T, Rows = usize>)

solves $A^H x = b$
Source§

fn rsolve_in_place(&self, lhs: impl AsMatMut<T = T, Cols = usize>)

solves $x A = b$
Source§

fn rsolve_conjugate_in_place(&self, lhs: impl AsMatMut<T = T, Cols = usize>)

solves $x \bar A = b$
Source§

fn rsolve_transpose_in_place(&self, lhs: impl AsMatMut<T = T, Cols = usize>)

solves $x A^\top = b$
Source§

fn rsolve_adjoint_in_place(&self, lhs: impl AsMatMut<T = T, Cols = usize>)

solves $x A^H = b$
Source§

fn solve<Rhs: AsMatRef<T = T, Rows = usize>>(&self, rhs: Rhs) -> Rhs::Owned

solves $A x = b$
Source§

fn solve_conjugate<Rhs: AsMatRef<T = T, Rows = usize>>( &self, rhs: Rhs, ) -> Rhs::Owned

solves $\bar A x = b$
Source§

fn solve_transpose<Rhs: AsMatRef<T = T, Rows = usize>>( &self, rhs: Rhs, ) -> Rhs::Owned

solves $A^\top x = b$
Source§

fn solve_adjoint<Rhs: AsMatRef<T = T, Rows = usize>>( &self, rhs: Rhs, ) -> Rhs::Owned

solves $A^H x = b$
Source§

fn rsolve<Lhs: AsMatRef<T = T, Cols = usize>>(&self, lhs: Lhs) -> Lhs::Owned

solves $x A = b$
Source§

fn rsolve_conjugate<Lhs: AsMatRef<T = T, Cols = usize>>( &self, lhs: Lhs, ) -> Lhs::Owned

solves $x \bar A = b$
Source§

fn rsolve_transpose<Lhs: AsMatRef<T = T, Cols = usize>>( &self, lhs: Lhs, ) -> Lhs::Owned

solves $x A^\top = b$
Source§

fn rsolve_adjoint<Lhs: AsMatRef<T = T, Cols = usize>>( &self, lhs: Lhs, ) -> Lhs::Owned

solves $x A^H = b$
Source§

impl<T, S> SolveLstsq<T> for S
where T: ComplexField, S: SolveLstsqCore<T> + ?Sized,

Source§

fn solve_lstsq_in_place(&self, rhs: impl AsMatMut<T = T, Rows = usize>)

solves $A x = b$ in the sense of least squares.
Source§

fn solve_conjugate_lstsq_in_place( &self, rhs: impl AsMatMut<T = T, Rows = usize>, )

solves $\bar A x = b$ in the sense of least squares.
Source§

fn solve_lstsq<Rhs: AsMatRef<T = T, Rows = usize>>( &self, rhs: Rhs, ) -> Rhs::Owned

solves $A x = b$ in the sense of least squares.
Source§

fn solve_conjugate_lstsq<Rhs: AsMatRef<T = T, Rows = usize>>( &self, rhs: Rhs, ) -> Rhs::Owned

solves $\bar A x = b$ in the sense of least squares.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T, S> DenseSolve<T> for S
where T: ComplexField, S: DenseSolveCore<T> + ?Sized,