pub struct TensorCI1<T: Scalar + TTScalar> { /* private fields */ }Expand description
State object for the one-site TCI algorithm (legacy).
Prefer TensorCI2 for new code.
TensorCI1 uses [MatrixACA] for pivot
selection and performs one-site updates (one index at a time).
Implementations§
Source§impl<T: Scalar + TTScalar + Default> TensorCI1<T>
impl<T: Scalar + TTScalar + Default> TensorCI1<T>
Sourcepub fn local_dims(&self) -> &[usize]
pub fn local_dims(&self) -> &[usize]
Get local dimensions
Sourcepub fn last_sweep_pivot_error(&self) -> f64
pub fn last_sweep_pivot_error(&self) -> f64
Get the maximum pivot error from the last sweep
Sourcepub fn site_tensor(&self, p: usize) -> Tensor3<T>
pub fn site_tensor(&self, p: usize) -> Tensor3<T>
Get site tensor at position p (T * P^{-1})
Sourcepub fn site_tensors(&self) -> Vec<Tensor3<T>> ⓘ
pub fn site_tensors(&self) -> Vec<Tensor3<T>> ⓘ
Get all site tensors
Sourcepub fn to_tensor_train(&self) -> Result<TensorTrain<T>>
pub fn to_tensor_train(&self) -> Result<TensorTrain<T>>
Convert to TensorTrain
Sourcepub fn max_sample_value(&self) -> f64
pub fn max_sample_value(&self) -> f64
Get maximum sample value
Sourcepub fn evaluate(&self, indices: &[usize]) -> Result<T>
pub fn evaluate(&self, indices: &[usize]) -> Result<T>
Evaluate the TCI at a specific set of indices
Sourcepub fn i_set(&self, p: usize) -> &IndexSet<MultiIndex>
pub fn i_set(&self, p: usize) -> &IndexSet<MultiIndex>
Get I set for a site
Sourcepub fn j_set(&self, p: usize) -> &IndexSet<MultiIndex>
pub fn j_set(&self, p: usize) -> &IndexSet<MultiIndex>
Get J set for a site
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for TensorCI1<T>
impl<T> RefUnwindSafe for TensorCI1<T>where
T: RefUnwindSafe,
impl<T> Send for TensorCI1<T>
impl<T> Sync for TensorCI1<T>
impl<T> Unpin for TensorCI1<T>where
T: Unpin,
impl<T> UnsafeUnpin for TensorCI1<T>
impl<T> UnwindSafe for TensorCI1<T>where
T: UnwindSafe,
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
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