pub struct MatrixLuciFactors<T> {
pub row_indices: Vec<usize>,
pub col_indices: Vec<usize>,
pub pivot_errors: Vec<f64>,
pub rank: usize,
pub left: Matrix<T>,
pub right: Matrix<T>,
}Expand description
High-level factors produced by MatrixLUCI.
This is the public result of the LUCI factorization facade. It exposes the selected pivot metadata and the left and right factors needed by higher-level tensor-network code without exposing the low-level pivot kernel substrate.
Related types: MatrixLUCI is the owning CI wrapper, while
MatrixACA and RrLU are related
matrix factorization entry points.
§Examples
use tensor4all_core::matrix_luci_factors_from_matrix;
use tensor4all_tensorbackend::from_vec2d;
let m = from_vec2d(vec![
vec![1.0_f64, 2.0],
vec![3.0, 4.0],
]);
let factors = matrix_luci_factors_from_matrix(&m, None).unwrap();
assert!(factors.rank >= 1);
assert_eq!(factors.row_indices.len(), factors.rank);
assert_eq!(factors.left.nrows(), m.nrows());
assert_eq!(factors.right.ncols(), m.ncols());Fields§
§row_indices: Vec<usize>Selected row indices.
col_indices: Vec<usize>Selected column indices.
pivot_errors: Vec<f64>Pivot error history.
rank: usizeSelected rank.
left: Matrix<T>Left factor.
right: Matrix<T>Right factor.
Trait Implementations§
Source§impl<T: Clone> Clone for MatrixLuciFactors<T>
impl<T: Clone> Clone for MatrixLuciFactors<T>
Source§fn clone(&self) -> MatrixLuciFactors<T>
fn clone(&self) -> MatrixLuciFactors<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for MatrixLuciFactors<T>
impl<T> RefUnwindSafe for MatrixLuciFactors<T>where
T: RefUnwindSafe,
impl<T> Send for MatrixLuciFactors<T>where
T: Send,
impl<T> Sync for MatrixLuciFactors<T>where
T: Sync,
impl<T> Unpin for MatrixLuciFactors<T>where
T: Unpin,
impl<T> UnsafeUnpin for MatrixLuciFactors<T>
impl<T> UnwindSafe for MatrixLuciFactors<T>where
T: UnwindSafe,
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
U: Sized,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
U: Sized,
Casts
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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