Struct net_ensembles::spacial::SpacialEnsemble[][src]

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

Implements a special Ensemble

  • You can generate a dot file which includes special information.
  • NOTE You should use neato for that to work
  • see module for literature

Implementations

Generate a new Spacial ensemble with

  • n nodes
  • rng as random number generator
  • f - see paper
  • alpha - see paper

The specific model I implemented is described in

Timo Dewenter and Alexander K. Hartmann, “Large-deviation properties of resilience of power grids” New J. Phys. 17 (2015), DOI: 10.1088/1367-2630/17/1/015005

Euclidean distance between two vertices

  • Calculates the distance between the vertices corresponding to the indices i and j
  • None if any of the indices is out of bounds

Calculates probability

  • calculates the probability for an edge between the vertices corresponding to the indices i and j

Of cause you can check if there is currently an edge, but this probability is the probability used when determining, if there should be an edge

Trait Implementations

Performs the conversion.

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

You should use neato if you want the correct spacial placement of nodes

  • use function f to create labels depending on the index
  • for valid dot_options use dot_options! macro and take a look at module dot_constants
  • Read more

  • same as self.dot_from_indices but returns String instead
  • use index as labels for the nodes
  • default implementation uses dot_from_indices
  • Read more

  • same as self.dot_with_indices but returns String instead
  • create dot file with empty labels
  • default implementation uses dot_from_indices
  • Read more

  • same as self.dot(), but returns a String instead
    • panics if step is error, or cannot be undone The latter means, you are undoing the steps in the wrong order

    Markov step Read more

    Markov steps without return Read more

  • undo a markov step, return result-state
  • if you want to undo more than one step see undo_steps
  • Read more

    Markov steps Read more

    Accumulating markov step Read more

    Accumulating markov steps Read more

    Accumulating markov steps Read more

    Undo markov steps Read more

    Undo markov steps Read more

    Serialize this value into the given Serde serializer. Read more

    Randomizes the edges according to Er probabilities

    • this is used by ErEnsembleC::new to create the initial topology
    • you can use this for sampling the ensemble
    • runs in O(vertices * vertices)

    do the following times times: Read more

    do the following times times: Read more

    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.