pub struct LuFactorResult<T: Scalar> {
pub factors: Tensor<T>,
pub pivots: Tensor<i32>,
}Expand description
Packed LU factorization result.
§Examples
use tenferro_linalg::lu_factor;
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(&mut ctx, &a).unwrap();
assert_eq!(result.pivots.len(), 2);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.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for LuFactorResult<T>
impl<T> !RefUnwindSafe for LuFactorResult<T>
impl<T> Send for LuFactorResult<T>
impl<T> Sync for LuFactorResult<T>
impl<T> Unpin for LuFactorResult<T>
impl<T> !UnwindSafe for LuFactorResult<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