pub struct SpectralSparsifier { /* private fields */ }Expand description
Spectral sparsification algorithm
Implementations§
Source§impl SpectralSparsifier
impl SpectralSparsifier
Sourcepub fn new(
eps: Precision,
target_sparsity: Precision,
seed: Option<u64>,
) -> Result<Self>
pub fn new( eps: Precision, target_sparsity: Precision, seed: Option<u64>, ) -> Result<Self>
Create new spectral sparsifier
Sourcepub fn sparsify_matrix(&self, matrix: &dyn Matrix) -> Result<SparsifiedMatrix>
pub fn sparsify_matrix(&self, matrix: &dyn Matrix) -> Result<SparsifiedMatrix>
Apply spectral sparsification to matrix
This preserves the quadratic form x^T A x within factor (1 ± eps) while reducing the number of non-zero entries
Trait Implementations§
Source§impl Clone for SpectralSparsifier
impl Clone for SpectralSparsifier
Source§fn clone(&self) -> SpectralSparsifier
fn clone(&self) -> SpectralSparsifier
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 moreAuto Trait Implementations§
impl Freeze for SpectralSparsifier
impl RefUnwindSafe for SpectralSparsifier
impl Send for SpectralSparsifier
impl Sync for SpectralSparsifier
impl Unpin for SpectralSparsifier
impl UnsafeUnpin for SpectralSparsifier
impl UnwindSafe for SpectralSparsifier
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