pub struct EigenResult<T: Scalar> {
pub values: Tensor<T>,
pub vectors: Tensor<T>,
}Expand description
Eigendecomposition result: A * V = V * diag(values).
Only valid for square matrices (m == n).
values: shape(n, *)(eigenvalues)vectors: shape(n, n, *)(right eigenvectors as columns)
§Examples
ⓘ
use tenferro_linalg::eigen;
use tenferro_tensor::{Tensor, MemoryOrder};
use tenferro_device::LogicalMemorySpace;
let a = Tensor::<f64>::zeros(&[3, 3],
LogicalMemorySpace::MainMemory, MemoryOrder::ColumnMajor);
let result = eigen(&a).unwrap();
assert_eq!(result.values.dims(), &[3]);
assert_eq!(result.vectors.dims(), &[3, 3]);Fields§
§values: Tensor<T>Eigenvalues. Shape: (n, *).
vectors: Tensor<T>Right eigenvectors (columns). Shape: (n, n, *).
Auto Trait Implementations§
impl<T> Freeze for EigenResult<T>
impl<T> !RefUnwindSafe for EigenResult<T>
impl<T> Send for EigenResult<T>
impl<T> Sync for EigenResult<T>
impl<T> Unpin for EigenResult<T>where
T: Unpin,
impl<T> !UnwindSafe for EigenResult<T>
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