[][src]Type Definition net_ensembles::sw_graph::SwGraph

type SwGraph<T> = GenericGraph<T, SwContainer<T>>;

specific GenericGraph used for small-world ensemble

Implementations

impl<T> SwGraph<T> where
    T: Node + SerdeStateConform
[src]

pub fn reset_edge(&mut self, index0: usize, index1: usize) -> SwChangeState[src]

Reset small-world edge to its root state

  • panics if index out of bounds
  • in debug: panics if index0 == index1

pub fn rewire_edge(
    &mut self,
    index0: usize,
    index1: usize,
    index2: usize
) -> SwChangeState
[src]

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 at index0, else will panic in debug mode