pub struct GaussianConditioner { /* private fields */ }Expand description
Reusable factorization of a symmetric positive-definite linear system.
The constructor accepts a dense matrix in row-major order, optionally adds a fixed non-negative jitter value to its diagonal, and computes a Cholesky factorization. Solves reuse that factorization and never form an explicit matrix inverse.
Implementations§
Source§impl GaussianConditioner
impl GaussianConditioner
Sourcepub fn new(
matrix: &[f64],
dimension: usize,
jitter: f64,
) -> Result<Self, ConditioningError>
pub fn new( matrix: &[f64], dimension: usize, jitter: f64, ) -> Result<Self, ConditioningError>
Construct a Gaussian conditioning system from a flattened square matrix.
matrix is interpreted in row-major order. The supplied jitter is
added exactly once to each diagonal entry before factorization.
§Errors
Returns ConditioningError when dimensions are inconsistent, values
are non-finite, jitter is negative, or Cholesky factorization fails.
Sourcepub fn solve(&self, rhs: &[f64]) -> Result<Vec<f64>, ConditioningError>
pub fn solve(&self, rhs: &[f64]) -> Result<Vec<f64>, ConditioningError>
Solve K x = rhs using the stored Cholesky factorization.
§Errors
Returns ConditioningError when the right-hand side has the wrong
dimension or contains non-finite entries.
Trait Implementations§
Source§impl Clone for GaussianConditioner
impl Clone for GaussianConditioner
Source§fn clone(&self) -> GaussianConditioner
fn clone(&self) -> GaussianConditioner
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for GaussianConditioner
impl RefUnwindSafe for GaussianConditioner
impl Send for GaussianConditioner
impl Sync for GaussianConditioner
impl Unpin for GaussianConditioner
impl UnsafeUnpin for GaussianConditioner
impl UnwindSafe for GaussianConditioner
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.