[][src]Enum net_ensembles::er_c::ErStepC

pub enum ErStepC {
    Nothing,
    AddedEdge((u32, u32)),
    RemovedEdge((u32, u32)),
    GError(GraphErrors),
}

Variants

Nothing

nothing was changed

AddedEdge((u32, u32))

an edge was added

RemovedEdge((u32, u32))

an edge was removed

GError(GraphErrors)

a GraphError occured and is wrapped here

Implementations

impl ErStepC[src]

pub fn is_valid(&self) -> bool[src]

true if self is not GError variant

pub fn valid_or_panic(&self)[src]

panic! if self is GError variant

pub fn valid_or_panic_msg(&self, msg: &str)[src]

panic!(msg) if self is GError variant

Trait Implementations

impl Clone for ErStepC[src]

impl Debug for ErStepC[src]

impl<T, R> MarkovChain<ErStepC, ErStepC> for ErEnsembleC<T, R> where
    T: Node + SerdeStateConform,
    R: Rng
[src]

fn m_step(&mut self) -> ErStepC[src]

Markov step

  • use this to perform a markov step, e.g., to create a markov chain
  • result ErStepC can be used to undo the step with self.undo_step(result)

fn undo_step(&mut self, step: ErStepC) -> ErStepC[src]

Undo a markcov step

  • adds removed edge, or removes added edge, or does nothing
  • if it returns an Err value, you probably used the function wrong

Important:

Restored graph is the same as before the random step except the order of nodes in the adjacency list might be shuffled!

fn undo_step_quiet(&mut self, step: ErStepC)[src]

Undo a markov step

  • adds removed edge, or removes added edge, or does nothing
  • if it returns an Err value, you probably used the function wrong

Important:

Restored graph is the same as before the random step except the order of nodes in the adjacency list might be shuffled!

Auto Trait Implementations

impl RefUnwindSafe for ErStepC

impl Send for ErStepC

impl Sync for ErStepC

impl Unpin for ErStepC

impl UnwindSafe for ErStepC

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,