pub trait QMatrix {
// Required methods
fn get_q(&mut self, i: usize, len: usize) -> &[Qfloat] ⓘ;
fn get_qd(&self) -> &[f64];
fn swap_index(&mut self, i: usize, j: usize);
}Expand description
Trait for Q matrix access used by the SMO solver.
Takes &mut self because get_q mutates the internal cache.
The solver owns Box<dyn QMatrix> and copies row data into its
own buffers to avoid lifetime issues.
Required Methods§
Sourcefn get_q(&mut self, i: usize, len: usize) -> &[Qfloat] ⓘ
fn get_q(&mut self, i: usize, len: usize) -> &[Qfloat] ⓘ
Get column i of the Q matrix, with at least len elements.
Sourcefn swap_index(&mut self, i: usize, j: usize)
fn swap_index(&mut self, i: usize, j: usize)
Swap indices i and j in all internal data structures.