pub enum Spectrum<I> {
Eigen(TensorRank0List<3>, TensorRank2<3, I, I, Dimensionless>),
Fallback(TensorRank2<3, I, I, Dimensionless>),
}Expand description
A cached eigendecomposition of a symmetric tensor, letting Self::powm/Self::dpowm be
evaluated at several exponents while paying for only one cubic eigensolve.
Variants§
Eigen(TensorRank0List<3>, TensorRank2<3, I, I, Dimensionless>)
Fallback(TensorRank2<3, I, I, Dimensionless>)
Implementations§
Source§impl<I> Spectrum<I>
impl<I> Spectrum<I>
Sourcepub fn new(
tensor: &TensorRank2<3, I, I, Dimensionless>,
) -> Result<Self, TensorError>
pub fn new( tensor: &TensorRank2<3, I, I, Dimensionless>, ) -> Result<Self, TensorError>
Caches the eigendecomposition of the tensor, when one is needed.
Sourcepub fn powm(
&self,
exponent: TensorRank0,
) -> Result<TensorRank2<3, I, I, Dimensionless>, TensorError>
pub fn powm( &self, exponent: TensorRank0, ) -> Result<TensorRank2<3, I, I, Dimensionless>, TensorError>
Returns the matrix power at the given exponent, reusing the cached eigendecomposition.
Sourcepub fn dpowm(
&self,
exponent: TensorRank0,
) -> Result<TensorRank4<3, I, I, I, I, Dimensionless>, TensorError>
pub fn dpowm( &self, exponent: TensorRank0, ) -> Result<TensorRank4<3, I, I, I, I, Dimensionless>, TensorError>
Returns the derivative of the matrix power at the given exponent, reusing the cached eigendecomposition.
Auto Trait Implementations§
impl<I> Freeze for Spectrum<I>
impl<I> RefUnwindSafe for Spectrum<I>where
I: RefUnwindSafe,
impl<I> Send for Spectrum<I>where
I: Send,
impl<I> Sync for Spectrum<I>where
I: Sync,
impl<I> Unpin for Spectrum<I>where
I: Unpin,
impl<I> UnsafeUnpin for Spectrum<I>
impl<I> UnwindSafe for Spectrum<I>where
I: UnwindSafe,
Blanket Implementations§
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