pub struct RsvdOptions {
pub max_bond_dim: usize,
pub range: RangeOptions,
}Expand description
Fixed output rank and sketch options for randomized_svd.
Global truncation defaults are ignored. Threshold-based accuracy needs an
a posteriori estimator and is deliberately unsupported in this first version.
Only dense f64/Complex64 inputs are supported; f32/Complex32 are not.
§Examples
use tensor4all_core::RsvdOptions;
let options = RsvdOptions::new(3);
assert_eq!(options.max_bond_dim, 3);
assert_eq!(options.range.oversampling, 8);Fields§
§max_bond_dim: usizePositive output rank cap. The actual rank is min(max_bond_dim, m, n).
range: RangeOptionsOversampling and power iterations; when in doubt use the defaults.
Implementations§
Trait Implementations§
Source§impl Clone for RsvdOptions
impl Clone for RsvdOptions
impl Copy for RsvdOptions
Auto Trait Implementations§
impl Freeze for RsvdOptions
impl RefUnwindSafe for RsvdOptions
impl Send for RsvdOptions
impl Sync for RsvdOptions
impl Unpin for RsvdOptions
impl UnsafeUnpin for RsvdOptions
impl UnwindSafe for RsvdOptions
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