pub enum SvdTruncationOptionsError {
ZeroMaxBondDim,
InvalidThreshold(f64),
}Expand description
Error from validating optional SVD truncation options.
This is the shared typed error for the neutral validation seam reused by TreeTN truncation/contraction/fit, partition algebra and adaptive patching, and the low-level SVD entry points.
§Examples
use tensor4all_core::SvdTruncationOptionsError;
assert_eq!(
SvdTruncationOptionsError::ZeroMaxBondDim.to_string(),
"max_bond_dim must be at least 1 when set"
);Variants§
ZeroMaxBondDim
max_bond_dim is present but zero.
InvalidThreshold(f64)
The SVD cutoff threshold is not finite or is negative.
Trait Implementations§
Source§impl Clone for SvdTruncationOptionsError
impl Clone for SvdTruncationOptionsError
Source§fn clone(&self) -> SvdTruncationOptionsError
fn clone(&self) -> SvdTruncationOptionsError
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 SvdTruncationOptionsError
Source§impl Debug for SvdTruncationOptionsError
impl Debug for SvdTruncationOptionsError
Source§impl Display for SvdTruncationOptionsError
impl Display for SvdTruncationOptionsError
Source§impl Error for SvdTruncationOptionsError
impl Error for SvdTruncationOptionsError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for SvdTruncationOptionsError
impl PartialEq for SvdTruncationOptionsError
Source§fn eq(&self, other: &SvdTruncationOptionsError) -> bool
fn eq(&self, other: &SvdTruncationOptionsError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SvdTruncationOptionsError
Auto Trait Implementations§
impl Freeze for SvdTruncationOptionsError
impl RefUnwindSafe for SvdTruncationOptionsError
impl Send for SvdTruncationOptionsError
impl Sync for SvdTruncationOptionsError
impl Unpin for SvdTruncationOptionsError
impl UnsafeUnpin for SvdTruncationOptionsError
impl UnwindSafe for SvdTruncationOptionsError
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 moreimpl<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