pub trait BasisUpdate<T: Real>:
Default
+ Clone
+ Debug {
// Required methods
fn update(
&mut self,
factors: &mut Factors<T>,
opts: &LuOptions,
r: usize,
alpha_r: T,
) -> Result<UpdateOutcome, LuError>;
fn apply_ftran(&self, y: &mut [T]);
fn apply_btran(&self, w: &mut [T]);
fn apply_ftran_hyper(
&self,
y: &mut [T],
list: &mut Vec<u32>,
mark: &mut [u32],
stamp: u32,
queued: &mut [bool],
);
fn apply_btran_hyper(
&self,
w: &mut [T],
list: &mut Vec<u32>,
mark: &mut [u32],
stamp: u32,
queued: &mut [bool],
);
fn reset(&mut self, m: usize, update_growth: f64);
fn stats(&self) -> &UpdateStats;
fn name(&self) -> &'static str;
}Expand description
A basis-update policy over the stored factors (the contract’s
BasisUpdate<T>; see the module documentation). Every implementation
is transactional — on Err and on RefactorReason::Unstable the
factors are exactly as before — and never modifies L.
Required Methods§
Sourcefn update(
&mut self,
factors: &mut Factors<T>,
opts: &LuOptions,
r: usize,
alpha_r: T,
) -> Result<UpdateOutcome, LuError>
fn update( &mut self, factors: &mut Factors<T>, opts: &LuOptions, r: usize, alpha_r: T, ) -> Result<UpdateOutcome, LuError>
Replaces the column at position r by the entering column whose
spike the last ftran_for_update left in factors; alpha_r is
entry r of its result.
Sourcefn apply_ftran(&self, y: &mut [T])
fn apply_ftran(&self, y: &mut [T])
Step F2 of the dense FTRAN on the row-indexed work array y.
Sourcefn apply_btran(&self, w: &mut [T])
fn apply_btran(&self, w: &mut [T])
Step B2 of the dense BTRAN on the row-indexed work array w.
Sourcefn apply_ftran_hyper(
&self,
y: &mut [T],
list: &mut Vec<u32>,
mark: &mut [u32],
stamp: u32,
queued: &mut [bool],
)
fn apply_ftran_hyper( &self, y: &mut [T], list: &mut Vec<u32>, mark: &mut [u32], stamp: u32, queued: &mut [bool], )
Step HF4 of the hypersparse FTRAN: list is the reach Λ, marked
in mark with stamp; rows the etas add are appended and marked.
queued is a zero work array with one flag per eta.
Sourcefn apply_btran_hyper(
&self,
w: &mut [T],
list: &mut Vec<u32>,
mark: &mut [u32],
stamp: u32,
queued: &mut [bool],
)
fn apply_btran_hyper( &self, w: &mut [T], list: &mut Vec<u32>, mark: &mut [u32], stamp: u32, queued: &mut [bool], )
Step HB4 of the hypersparse BTRAN, as BasisUpdate::apply_ftran_hyper.
Sourcefn reset(&mut self, m: usize, update_growth: f64)
fn reset(&mut self, m: usize, update_growth: f64)
Forgets every update: called after each factorization of an
m × m basis, with the update growth of the fresh factors (0
after a failed factorization).
Sourcefn stats(&self) -> &UpdateStats
fn stats(&self) -> &UpdateStats
The counters since the last factorization.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".