Struct CholeskyExResult
pub struct CholeskyExResult<T>where
T: Scalar,{
pub l: Tensor<T>,
pub info: Tensor<i32>,
}Expand description
Structured Cholesky result with numerical status information.
info contains one entry per batch matrix. Zero means success.
§Examples
use tenferro_linalg::cholesky_ex;
use tenferro_prims::CpuContext;
use tenferro_tensor::{MemoryOrder, Tensor};
let mut ctx = CpuContext::new(1);
let a = Tensor::from_slice(&[4.0_f64, 2.0, 2.0, 3.0], &[2, 2], MemoryOrder::ColumnMajor)
.unwrap();
let result = cholesky_ex(&mut ctx, &a).unwrap();
assert_eq!(result.info.len(), 1);Fields§
§l: Tensor<T>Lower-triangular Cholesky factor.
info: Tensor<i32>Per-batch numerical status tensor.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for CholeskyExResult<T>
impl<T> !RefUnwindSafe for CholeskyExResult<T>
impl<T> Send for CholeskyExResult<T>
impl<T> Sync for CholeskyExResult<T>
impl<T> Unpin for CholeskyExResult<T>
impl<T> !UnwindSafe for CholeskyExResult<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
§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