Struct NaiveDense
pub struct NaiveDense;Expand description
Reference kernels: straightforward loops, always available, the oracle of the others in tests.
use xingo_sparse::{DenseBlock, DenseKernel, NaiveDense};
let mut a = DenseBlock { rows: 2, cols: 2, data: vec![4.0, 2.0, 0.0, 5.0] };
NaiveDense.potrf(&mut a).unwrap();
assert_eq!((a.get(0, 0), a.get(1, 0), a.get(1, 1)), (2.0, 1.0, 2.0));Trait Implementations§
§impl Clone for NaiveDense
impl Clone for NaiveDense
§fn clone(&self) -> NaiveDense
fn clone(&self) -> NaiveDense
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NaiveDense
§impl Debug for NaiveDense
impl Debug for NaiveDense
§impl Default for NaiveDense
impl Default for NaiveDense
§fn default() -> NaiveDense
fn default() -> NaiveDense
Returns the “default value” for a type. Read more
§impl<T> DenseKernel<T> for NaiveDensewhere
T: Real,
impl<T> DenseKernel<T> for NaiveDensewhere
T: Real,
§fn potrf(&self, a: &mut DenseBlock<T>) -> Result<(), DenseError>
fn potrf(&self, a: &mut DenseBlock<T>) -> Result<(), DenseError>
In-place Cholesky
A = L Lᵀ of a square block (Algorithm P).§fn sytrf(
&self,
a: &mut DenseBlock<T>,
perm: &mut Perm,
pivot_2x2: &mut Vec<bool>,
) -> Result<Inertia, DenseError>
fn sytrf( &self, a: &mut DenseBlock<T>, perm: &mut Perm, pivot_2x2: &mut Vec<bool>, ) -> Result<Inertia, DenseError>
In-place
P A Pᵀ = L B Lᵀ with 1×1/2×2 pivots (Bunch–Kaufman,
Algorithm B); returns the inertia and writes the permutation into
perm and the 2×2 marks into pivot_2x2 (both resized to n).§fn trsm_lower(&self, l: &DenseBlock<T>, b: &mut DenseBlock<T>, transpose: bool)
fn trsm_lower(&self, l: &DenseBlock<T>, b: &mut DenseBlock<T>, transpose: bool)
§fn gemm_sub(&self, a: &DenseBlock<T>, b: &DenseBlock<T>, c: &mut DenseBlock<T>)
fn gemm_sub(&self, a: &DenseBlock<T>, b: &DenseBlock<T>, c: &mut DenseBlock<T>)
C ← C − A Bᵀ. Read more§fn syrk_sub(&self, a: &DenseBlock<T>, c: &mut DenseBlock<T>)
fn syrk_sub(&self, a: &DenseBlock<T>, c: &mut DenseBlock<T>)
§fn solve_min_rows(&self) -> usize
fn solve_min_rows(&self) -> usize
The smallest row count
n_r of a supernode block for which the
solves of SupernodalLdl go through this kernel (gather, hook,
scatter; step S0′ of Chapter 5.17). usize::MAX — the default —
keeps the loops of the second edition everywhere. A cost switch
only (invariant (D5)).§fn solve_unit_lower(&self, l: &DenseBlock<T>, skip: &[bool], y: &mut [T])
fn solve_unit_lower(&self, l: &DenseBlock<T>, skip: &[bool], y: &mut [T])
Forward half of a supernode’s solve,
y ← L⁻¹ y (Algorithm V).
l is the stored block (rows ≥ cols, unit lower trapezoidal,
diagonal slots ignored); skip is empty or has l.cols marks (the
first column of each 2×2 pivot). Read more§fn solve_unit_lower_t(&self, l: &DenseBlock<T>, skip: &[bool], y: &mut [T])
fn solve_unit_lower_t(&self, l: &DenseBlock<T>, skip: &[bool], y: &mut [T])
Backward half,
y_{..cols} ← L₁₁⁻ᵀ (y_{..cols} − L₂₁ᵀ y_{cols..})
(Algorithm W); y[cols..] is read only. Read moreimpl Eq for NaiveDense
§impl PartialEq for NaiveDense
impl PartialEq for NaiveDense
impl StructuralPartialEq for NaiveDense
Auto Trait Implementations§
impl Freeze for NaiveDense
impl RefUnwindSafe for NaiveDense
impl Send for NaiveDense
impl Sync for NaiveDense
impl Unpin for NaiveDense
impl UnsafeUnpin for NaiveDense
impl UnwindSafe for NaiveDense
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