Type Definition net_ensembles::sw_graph::SwGraph
source · [−]pub type SwGraph<T> = GenericGraph<T, SwContainer<T>>;
Expand description
specific GenericGraph
used for small-world ensemble
Implementations
sourceimpl<T> SwGraph<T>where
T: Node + SerdeStateConform,
impl<T> SwGraph<T>where
T: Node + SerdeStateConform,
sourcepub fn reset_edge(&mut self, index0: usize, index1: usize) -> SwChangeState
pub fn reset_edge(&mut self, index0: usize, index1: usize) -> SwChangeState
Reset small-world edge to its root state
- panics if index out of bounds
- in debug: panics if
index0 == index1
sourcepub fn rewire_edge(
&mut self,
index0: usize,
index1: usize,
index2: usize
) -> SwChangeState
pub fn rewire_edge(
&mut self,
index0: usize,
index1: usize,
index2: usize
) -> SwChangeState
Rewire edges
- rewire edge
(index0, index1)
to(index0, index2)
panics
- if indices are out of bounds
- in debug: panics if
index0 == index2
- edge
(index0, index1)
has to be rooted atindex0
, else will panic in debug mode
sourcepub fn count_nodes_with_long_ranging_edges(&self) -> usize
pub fn count_nodes_with_long_ranging_edges(&self) -> usize
How many nodes have long ranging edges?
- counts how many nodes have long ranging edges
- A long ranging edge is defined as an edge, where is_at_root returns true, i.e., which is not in ist original ring configuration
sourcepub fn frac_nodes_wlre(&self) -> f64
pub fn frac_nodes_wlre(&self) -> f64
Fraction of nodes which have long ranging edges
- A long ranging edge is defined as an edge, where is_at_root returns true, i.e., which is not in ist original ring configuration
sourcepub fn count_long_ranging_edges(&self) -> usize
pub fn count_long_ranging_edges(&self) -> usize
How many long ranging edges are there in the Graph?
- A long ranging edge is defined as an edge, where is_at_root returns true, i.e., which is not in ist original ring configuration
sourcepub fn frac_long_ranging_edges(&self) -> f64
pub fn frac_long_ranging_edges(&self) -> f64
Fraction of long ranging edges in the Graph?
- A long ranging edge is defined as an edge, where is_at_root returns false, i.e., which is not in ist original ring configuration
- this is: #longranging/#total