pub struct GraphUncertaintyPrinciple {
pub spatial_distances_sq: Array1<f64>,
pub ref_frequency: f64,
}Expand description
Graph uncertainty principle: spatial spread vs. spectral spread tradeoff.
Analogous to Heisenberg’s uncertainty principle, signals on graphs cannot be simultaneously concentrated in both the vertex domain and the spectral domain.
Spatial spread of signal x about reference node v₀:
Δ_V²(x) = Σ_i d(i, v₀)² x_i² / ‖x‖²
Spectral spread about reference frequency λ₀:
Δ_S²(x) = Σ_k (λ_k − λ₀)² x̂_k² / ‖x‖²
The product Δ_V Δ_S ≥ C for some graph-dependent constant.
Fields§
§spatial_distances_sq: Array1<f64>Squared pairwise distances from each node to node v₀.
ref_frequency: f64Reference frequency λ₀ (usually the DC frequency = 0).
Implementations§
Source§impl GraphUncertaintyPrinciple
impl GraphUncertaintyPrinciple
Sourcepub fn new(adj: &Array2<f64>, v0: usize, ref_frequency: f64) -> Result<Self>
pub fn new(adj: &Array2<f64>, v0: usize, ref_frequency: f64) -> Result<Self>
Build from BFS shortest-path distances from reference node v0.
§Arguments
adj— weighted adjacency matrix.v0— reference node index (typically the “centre” of the signal).ref_frequency— spectral reference point (default: 0 for DC).
Sourcepub fn spatial_spread(&self, signal: &Array1<f64>) -> Result<f64>
pub fn spatial_spread(&self, signal: &Array1<f64>) -> Result<f64>
Compute the spatial spread Δ_V(x) for signal x.
Sourcepub fn spectral_spread(
&self,
gft: &GraphFourierTransform,
signal: &Array1<f64>,
) -> Result<f64>
pub fn spectral_spread( &self, gft: &GraphFourierTransform, signal: &Array1<f64>, ) -> Result<f64>
Compute the spectral spread Δ_S(x) for signal x using the GFT.
Sourcepub fn uncertainty(
&self,
gft: &GraphFourierTransform,
signal: &Array1<f64>,
) -> Result<(f64, f64, f64)>
pub fn uncertainty( &self, gft: &GraphFourierTransform, signal: &Array1<f64>, ) -> Result<(f64, f64, f64)>
Compute both spatial and spectral spreads and their product.
Returns (spatial_spread, spectral_spread, product).
Trait Implementations§
Source§impl Clone for GraphUncertaintyPrinciple
impl Clone for GraphUncertaintyPrinciple
Source§fn clone(&self) -> GraphUncertaintyPrinciple
fn clone(&self) -> GraphUncertaintyPrinciple
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for GraphUncertaintyPrinciple
impl RefUnwindSafe for GraphUncertaintyPrinciple
impl Send for GraphUncertaintyPrinciple
impl Sync for GraphUncertaintyPrinciple
impl Unpin for GraphUncertaintyPrinciple
impl UnsafeUnpin for GraphUncertaintyPrinciple
impl UnwindSafe for GraphUncertaintyPrinciple
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more