pub struct SpectralAnalysis {
pub eigenvalues: Vec<f64>,
pub spectral_gap: f64,
pub algebraic_connectivity: f64,
pub mixing_time_bound: f64,
pub components: usize,
}Expand description
Result of spectral analysis on the verification graph.
Fields§
§eigenvalues: Vec<f64>Eigenvalues of the normalised Laplacian, sorted ascending.
spectral_gap: f64Spectral gap: λ₁ (the smallest non-zero eigenvalue).
algebraic_connectivity: f64Algebraic connectivity (= λ₁ of the Laplacian).
mixing_time_bound: f64Upper bound on mixing time from the spectral gap.
components: usizeNumber of connected components (count of zero eigenvalues).
Implementations§
Source§impl SpectralAnalysis
impl SpectralAnalysis
Sourcepub fn from_network(network: &FlowNetwork) -> Self
pub fn from_network(network: &FlowNetwork) -> Self
Perform spectral analysis on a flow network’s Laplacian.
Sourcepub fn from_adjacency(adj: &Array2<f64>) -> Self
pub fn from_adjacency(adj: &Array2<f64>) -> Self
Perform spectral analysis on an arbitrary adjacency matrix.
Sourcepub fn heat_kernel_trace(&self, t: f64) -> f64
pub fn heat_kernel_trace(&self, t: f64) -> f64
Heat kernel: H(t) = exp(-tL). Approximated via eigendecomposition.
Returns the heat kernel trace at time t.
Trait Implementations§
Source§impl Clone for SpectralAnalysis
impl Clone for SpectralAnalysis
Source§fn clone(&self) -> SpectralAnalysis
fn clone(&self) -> SpectralAnalysis
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 moreSource§impl Debug for SpectralAnalysis
impl Debug for SpectralAnalysis
Source§impl<'de> Deserialize<'de> for SpectralAnalysis
impl<'de> Deserialize<'de> for SpectralAnalysis
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SpectralAnalysis
impl RefUnwindSafe for SpectralAnalysis
impl Send for SpectralAnalysis
impl Sync for SpectralAnalysis
impl Unpin for SpectralAnalysis
impl UnsafeUnpin for SpectralAnalysis
impl UnwindSafe for SpectralAnalysis
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