Struct net_ensembles::watts_strogatz::SmallWorldWS[][src]

pub struct SmallWorldWS<T, R> { /* fields omitted */ }
Expand description

Implements small-world graph ensemble

  • Note the implemented traits!

Implementations

Returns neigbor distance of the initial ring

A neighbor distance of 1 means, in the original ring structure every node is connected to its two nearest neigbors, a neighbor distance of 2 means, it is connected to its 4 nearest neigbors and so on

The graph will contain neighbor_distance * system size (i.e. graph.vertex_count()) connections

retunrs rewire probability the ensemble is set to

On average, a fraction of rewire_prob nodes should be rewired

Initialize a WS - a small-world ensemble

  • n is the system size, i.e., how many nodes there should be in the created graphs
  • neighbor_distance is needed for the initial ring structure. See also WS::neigbor_distance
  • rewire_probability - each edge will be rewired with a probability of rewire_probability - see also WS::rewire_prob
  • rng - random number generator

Trait Implementations

Performs the conversion.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns a reference to the element stored in the specified node or None if out of Bounds

Returns a mutable reference to the element stored in the specified node or None if out of Bounds

For a save alternative see get_contained Read more

Returns a mutable reference to the element stored in the specified node Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

  • get iterator over additional information stored at each vertex in order of the indices
  • iterator returns a Node (for example EmptyNode or whatever you used)
  • similar to self.container_iter().map(|container| container.contained())
  • Read more

  • iterate over additional information of neighbors of vertex index
  • iterator returns &T
  • sort_adj will affect the order
  • panics if index out of bounds
  • Read more

  • iterate over additional information of neighbors of vertex index
  • iterator returns (index_neighbor,&T)
  • sort_adj will affect the order
  • panics if index out of bounds
  • Read more

  • get iterator over AdjContainer in order of the indices
  • iterator returns AdjContainer<Node>, i.e., A
  • Read more

  • iterate over additional information of neighbors of vertex index
  • iterator returns &T
  • sort_adj will affect the order
  • panics if index out of bounds
  • Read more

    returns Iterator Read more

    returns Iterator Read more

    returns Iterator Read more

  • iterate over mutable additional information of neighbors of vertex index
  • iterator returns &mut T
  • sort_adj will affect the order
  • panics if index out of bounds
  • Read more

  • iterate over mutable additional information of neighbors of vertex index
  • iterator returns (index_neighbor: usize, neighbor: &mut T)
  • sort_adj will affect the order
  • panics if index out of bounds
  • Read more

  • get iterator over mutable additional information stored at each vertex in order of the indices
  • iterator returns a Node (for example EmptyNode or whatever you used)
  • Read more

    If you need to exchange the internal rng Read more

    Access RNG Read more

    Serialize this value into the given Serde serializer. Read more

    Randomizes self according to model Read more

    do the following times times: Read more

    do the following times times: Read more

  • access additional information at index
  • mutable access to additional information at index
  • returns reference to the underlying topology aka, the GenericGraph
  • use this to call functions regarding the topology
  • Read more

  • sorts Adjecaency List
  • Auto Trait Implementations

    Blanket Implementations

    Gets the TypeId of self. Read more

    Immutably borrows from an owned value. Read more

    Mutably borrows from an owned value. Read more

    Cast from Self to T

    Try converting from Self to T

    Cast to integer, truncating Read more

    Cast to the nearest integer Read more

    Cast the floor to an integer Read more

    Cast the ceiling to an integer Read more

    Try converting to integer with truncation Read more

    Try converting to the nearest integer Read more

    Try converting the floor to an integer Read more

    Try convert the ceiling to an integer Read more

    Convert from T to Self

    Try converting from T to Self

    Performs the conversion.

    Performs the conversion.

    The alignment of pointer.

    The type for initializers.

    Initializes a with the given initializer. Read more

    Dereferences the given pointer. Read more

    Mutably dereferences the given pointer. Read more

    Drops the object pointed to by the given pointer. Read more

    The resulting type after obtaining ownership.

    Creates owned data from borrowed data, usually by cloning. Read more

    🔬 This is a nightly-only experimental API. (toowned_clone_into)

    recently added

    Uses borrowed data to replace owned data, usually by cloning. Read more

    The type returned in the event of a conversion error.

    Performs the conversion.

    The type returned in the event of a conversion error.

    Performs the conversion.