Skip to main content

NaiveDense

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

§

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)

Performs copy-assignment from source. Read more
§

impl Copy for NaiveDense

§

impl Debug for NaiveDense

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for NaiveDense

§

fn default() -> NaiveDense

Returns the “default value” for a type. Read more
§

impl<T> DenseKernel<T> for NaiveDense
where T: Real,

§

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>

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)

B ← B L⁻ᵀ (transpose = true) or B ← L⁻¹ B (false), L square, non-unit lower triangular. Read more
§

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>)

C ← C − A Aᵀ, lower triangle of C. Read more
§

fn name(&self) -> &'static str

A short name for logs and tables.
§

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])

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])

Backward half, y_{..cols} ← L₁₁⁻ᵀ (y_{..cols} − L₂₁ᵀ y_{cols..}) (Algorithm W); y[cols..] is read only. Read more
§

impl Eq for NaiveDense

§

impl PartialEq for NaiveDense

§

fn eq(&self, other: &NaiveDense) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
§

impl StructuralPartialEq for NaiveDense

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.