Struct LuFactorExResult
pub struct LuFactorExResult<T>where
T: Scalar,{
pub factors: Tensor<T>,
pub pivots: Tensor<i32>,
pub info: Tensor<i32>,
}Expand description
Packed LU factorization result with numerical status information.
§Examples
use tenferro_linalg::lu_factor_ex;
use tenferro_prims::CpuContext;
use tenferro_tensor::{MemoryOrder, Tensor};
let mut ctx = CpuContext::new(1);
let a = Tensor::from_slice(&[2.0_f64, 1.0, 1.0, 3.0], &[2, 2], MemoryOrder::ColumnMajor)
.unwrap();
let result = lu_factor_ex(&mut ctx, &a).unwrap();
assert_eq!(result.info.len(), 1);Fields§
§factors: Tensor<T>Packed LU factors with the same shape as the input.
pivots: Tensor<i32>Backend pivot tensor in 1-indexed step-pivot form.
info: Tensor<i32>Per-batch numerical status tensor.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for LuFactorExResult<T>
impl<T> !RefUnwindSafe for LuFactorExResult<T>
impl<T> Send for LuFactorExResult<T>
impl<T> Sync for LuFactorExResult<T>
impl<T> Unpin for LuFactorExResult<T>
impl<T> !UnwindSafe for LuFactorExResult<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