pub struct ScaledLaplacian {
pub entries: Vec<(usize, usize, f64)>,
pub n: usize,
pub lambda_max: f64,
}Expand description
Scaled Laplacian for Chebyshev approximation L_scaled = 2L/λ_max - I (eigenvalues in [-1, 1])
Fields§
§entries: Vec<(usize, usize, f64)>Sparse representation: (row, col, value)
n: usizeMatrix dimension
lambda_max: f64Estimated maximum eigenvalue
Implementations§
Source§impl ScaledLaplacian
impl ScaledLaplacian
Sourcepub fn from_adjacency(adj: &[f64], n: usize) -> Self
pub fn from_adjacency(adj: &[f64], n: usize) -> Self
Build from adjacency matrix (dense)
Sourcepub fn from_sparse_adjacency(edges: &[(usize, usize, f64)], n: usize) -> Self
pub fn from_sparse_adjacency(edges: &[(usize, usize, f64)], n: usize) -> Self
Build from sparse adjacency list
Sourcepub fn lambda_max(&self) -> f64
pub fn lambda_max(&self) -> f64
Get original (unscaled) maximum eigenvalue estimate
Trait Implementations§
Source§impl Clone for ScaledLaplacian
impl Clone for ScaledLaplacian
Source§fn clone(&self) -> ScaledLaplacian
fn clone(&self) -> ScaledLaplacian
Returns a duplicate of the value. Read more
1.0.0 · 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 ScaledLaplacian
impl RefUnwindSafe for ScaledLaplacian
impl Send for ScaledLaplacian
impl Sync for ScaledLaplacian
impl Unpin for ScaledLaplacian
impl UnwindSafe for ScaledLaplacian
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