pub struct SrcErrorEstimate {
pub error: f64,
pub norm: f64,
}Expand description
Small-matrix diagnostics produced by the successive randomized compression stopping estimator.
error is the Appendix C randomized residual estimate and norm is the
corresponding Frobenius norm estimate. Both values use the sketch width as
their normalization factor.
§Examples
use tensor4all_tensorbackend::{src_error_estimate, Matrix};
let r = Matrix::from_col_major_vec(1, 1, vec![2.0_f64]);
let estimate = src_error_estimate(&r).unwrap();
assert!((estimate.error - 2.0).abs() < 1.0e-12);
assert!((estimate.norm - 2.0).abs() < 1.0e-12);Fields§
§error: f64Estimated residual magnitude from the inverse-adjoint QR factor.
norm: f64Estimated norm of the sketched tensor from the QR factor.
Trait Implementations§
Source§impl Clone for SrcErrorEstimate
impl Clone for SrcErrorEstimate
Source§fn clone(&self) -> SrcErrorEstimate
fn clone(&self) -> SrcErrorEstimate
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 moreimpl Copy for SrcErrorEstimate
Source§impl Debug for SrcErrorEstimate
impl Debug for SrcErrorEstimate
Source§impl PartialEq for SrcErrorEstimate
impl PartialEq for SrcErrorEstimate
Source§fn eq(&self, other: &SrcErrorEstimate) -> bool
fn eq(&self, other: &SrcErrorEstimate) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SrcErrorEstimate
Auto Trait Implementations§
impl Freeze for SrcErrorEstimate
impl RefUnwindSafe for SrcErrorEstimate
impl Send for SrcErrorEstimate
impl Sync for SrcErrorEstimate
impl Unpin for SrcErrorEstimate
impl UnsafeUnpin for SrcErrorEstimate
impl UnwindSafe for SrcErrorEstimate
Blanket Implementations§
impl<T> Boilerplate for T
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
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