pub struct RankRevealingQrResult<T, M = T> {
pub q: T,
pub r: T,
pub column_permutation: M,
pub rank: M,
}Expand description
Four fixed-shape outputs of a rank-revealing QR factorization.
Q and R use T; the column permutation and numerical rank use M.
For dynamic, eager, and traced tensors, T and M are the same tensor
type. Typed tensors use crate::TypedRankRevealingQrResult, whose metadata
tensors have scalar type i64.
§Examples
use tenferro_linalg::RankRevealingQrResult;
let result = RankRevealingQrResult {
q: "q",
r: "r",
column_permutation: vec![1_i64, 0],
rank: vec![2_i64],
};
assert_eq!(result.column_permutation, [1, 0]);
assert_eq!(result.rank, [2]);Fields§
§q: TThin orthonormal factor with shape [m, min(m, n), batch...].
r: TUpper-trapezoidal factor with shape [min(m, n), n, batch...].
column_permutation: MZero-based original column at each factor column, shaped [n, batch...].
rank: MLeading-prefix numerical rank, shaped [batch...].
Trait Implementations§
Auto Trait Implementations§
impl<T, M> Freeze for RankRevealingQrResult<T, M>
impl<T, M> RefUnwindSafe for RankRevealingQrResult<T, M>where
T: RefUnwindSafe,
M: RefUnwindSafe,
impl<T, M> Send for RankRevealingQrResult<T, M>
impl<T, M> Sync for RankRevealingQrResult<T, M>
impl<T, M> Unpin for RankRevealingQrResult<T, M>
impl<T, M> UnsafeUnpin for RankRevealingQrResult<T, M>where
T: UnsafeUnpin,
M: UnsafeUnpin,
impl<T, M> UnwindSafe for RankRevealingQrResult<T, M>where
T: UnwindSafe,
M: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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