pub struct RrLUPivots {
pub row_indices: Vec<usize>,
pub col_indices: Vec<usize>,
pub pivot_errors: Vec<f64>,
pub rank: usize,
}Expand description
Pivot indices and error diagnostics from a rank-revealing LU selection.
This is the selection-only counterpart of RrLU: the same pivot search
and rank decision as rrlu/rrlu_mut, but without assembling the L
and U factors. Use it when only the selected pivots and the pivot error
history are needed and the factors would be discarded.
§Examples
use tensor4all_core::matrixlu::rrlu_pivots;
use tensor4all_tensorbackend::from_vec2d;
let a = from_vec2d(vec![
vec![1.0_f64, 2.0],
vec![2.0, 4.0],
]);
let pivots = rrlu_pivots(a, None).unwrap();
assert_eq!(pivots.rank, 1);
assert_eq!(pivots.row_indices.len(), pivots.rank);
assert_eq!(pivots.col_indices.len(), pivots.rank);
// One accepted pivot plus the final residual.
assert_eq!(pivots.pivot_errors.len(), pivots.rank + 1);Fields§
§row_indices: Vec<usize>Selected row indices, in pivot order.
col_indices: Vec<usize>Selected column indices, in pivot order.
pivot_errors: Vec<f64>Accepted pivot magnitudes followed by the final residual estimate.
rank: usizeNumber of selected pivots.
Trait Implementations§
Source§impl Clone for RrLUPivots
impl Clone for RrLUPivots
Source§fn clone(&self) -> RrLUPivots
fn clone(&self) -> RrLUPivots
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 moreSource§impl Debug for RrLUPivots
impl Debug for RrLUPivots
Source§impl PartialEq for RrLUPivots
impl PartialEq for RrLUPivots
impl StructuralPartialEq for RrLUPivots
Auto Trait Implementations§
impl Freeze for RrLUPivots
impl RefUnwindSafe for RrLUPivots
impl Send for RrLUPivots
impl Sync for RrLUPivots
impl Unpin for RrLUPivots
impl UnsafeUnpin for RrLUPivots
impl UnwindSafe for RrLUPivots
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