Struct SimpleLabeledGraph

Source
pub struct SimpleLabeledGraph<L1: Label, L2: Label> { /* private fields */ }
Expand description

L1 is the label of the nodes, L2 is the label of the edges. All these labels needs to implement the Label trait.

The graph is directed.

Implementations§

Source§

impl SimpleLabeledGraph<String, SingleLabel>

Source

pub fn new() -> Self

Source

pub fn add_node(&mut self, id: u64, label: String)

Source

pub fn add_edge(&mut self, src: u64, dst: u64)

Auto Trait Implementations§

§

impl<L1, L2> Freeze for SimpleLabeledGraph<L1, L2>

§

impl<L1, L2> RefUnwindSafe for SimpleLabeledGraph<L1, L2>

§

impl<L1, L2> Send for SimpleLabeledGraph<L1, L2>
where L1: Send, L2: Send,

§

impl<L1, L2> Sync for SimpleLabeledGraph<L1, L2>
where L1: Sync, L2: Sync,

§

impl<L1, L2> Unpin for SimpleLabeledGraph<L1, L2>
where L1: Unpin, L2: Unpin,

§

impl<L1, L2> UnwindSafe for SimpleLabeledGraph<L1, L2>
where L1: UnwindSafe, L2: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<'a, 'b, T> Simulation<'a> for T
where 'b: 'a, T: Graph<'a> + Adjacency<'a> + AdjacencyInv<'a> + Labeled<'a> + Directed + LabeledAdjacency<'a>, <T as Graph<'a>>::Node: 'a, <T as Graph<'a>>::Edge: 'a,

Source§

type Node = <T as Graph<'a>>::Node

Source§

fn get_simulation( &'a self, ) -> HashMap<&'a <T as Simulation<'a>>::Node, HashSet<&'a <T as Simulation<'a>>::Node>>

Source§

fn get_simulation_inter( &'a self, other: &'a T, ) -> HashMap<&'a <T as Simulation<'a>>::Node, HashSet<&'a <T as Simulation<'a>>::Node>>

Source§

fn get_simulation_native( &'a self, other: &'a T, ) -> HashMap<&'a <T as Simulation<'a>>::Node, HashSet<&'a <T as Simulation<'a>>::Node>>

Source§

fn get_simulation_of_node_edge( &'a self, other: &'a T, ) -> HashMap<&'a <T as Simulation<'a>>::Node, HashSet<&'a <T as Simulation<'a>>::Node>>

Source§

fn get_simulation_of_edge( &'a self, other: &'a T, ) -> HashMap<&'a <T as Simulation<'a>>::Node, HashSet<&'a <T as Simulation<'a>>::Node>>

Source§

fn has_simulation( sim: HashMap<&'a <T as Simulation<'a>>::Node, HashSet<&'a <T as Simulation<'a>>::Node>>, ) -> bool

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.