pub struct EigResult<R: LinalgScalar<Real = R> + Float> {
pub values: Tensor<Complex<R>>,
pub vectors: Tensor<Complex<R>>,
}Expand description
Result of general eigendecomposition (always complex-valued).
§Examples
use tenferro_device::LogicalMemorySpace;
use tenferro_linalg::{eig, EigResult};
use tenferro_prims::CpuContext;
use tenferro_tensor::{MemoryOrder, Tensor};
let mut ctx = CpuContext::new(1);
let a = Tensor::<f64>::zeros(
&[3, 3],
LogicalMemorySpace::MainMemory,
MemoryOrder::ColumnMajor,
).unwrap();
let result: EigResult<f64> = eig(&mut ctx, &a).unwrap();
assert_eq!(result.vectors.dims(), &[3, 3]);Fields§
§values: Tensor<Complex<R>>Complex eigenvalues.
vectors: Tensor<Complex<R>>Complex right eigenvectors.
Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for EigResult<R>
impl<R> !RefUnwindSafe for EigResult<R>
impl<R> Send for EigResult<R>
impl<R> Sync for EigResult<R>
impl<R> Unpin for EigResult<R>
impl<R> !UnwindSafe for EigResult<R>
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
§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