Struct net_ensembles::BAensemble[][src]

pub struct BAensemble<T, R> where
    T: Node,
    R: Rng
{ /* fields omitted */ }
Expand description

Implements a Barabási-Albert Graph ensemble

Implementations

Initialize
  • create simplest form of Barabási-Albert graph
  • m = 1
  • n: Number of nodes, n > 1 has to be true panics otherwise
  • rng: Rng to use

Generate a new BA graph ensemble with a specified source graph

  • panics if source_graph contains any vertices with degree 0
  • m: how many edges should each newly added vertex have originally
  • rng: Random number generator
  • n: Number of nodes, n > source_graph.vertex_count() has to be true panics otherwise

Generate a new BA graph ensemble with a specified generic source graph

  • panics if generic_source_graph contains any vertices with degree 0
  • m: how many edges should each newly added vertex have originally
  • rng: Random number generator
  • n: Number of nodes, n > source_graph.vertex_count() has to be true panics otherwise

get reference to original graph, which is at the core of the BA graph

Trait Implementations

Performs the conversion.

Immutably borrows from an owned value. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. 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

    Serialize this value into the given Serde serializer. Read more

    Randomizes the Barabási-Albert (BA) graph
    • this essentially deletes the BA graph and creates a new one using the initial graph

    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)

    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.