[][src]Struct net_ensembles::graph::NodeContainer

pub struct NodeContainer<T: Node> { /* fields omitted */ }

Used for accessing neighbor information from graph

  • contains Adjacency list and internal id (normally the index in the graph).
  • also contains user specified data, i.e, T from NodeContainer<T>
  • see trait AdjContainer

Trait Implementations

impl<T: Node> AdjContainer<T> for NodeContainer<T>[src]

fn new(id: u32, node: T) -> Self[src]

Create new instance with id

fn parse_str(to_parse: &str) -> Option<(&str, Self)>[src]

parse from str

  • tries to parse a NodeContainer from a str.
  • will ignore leading whitespaces and other chars, as long as they do not match "id: "
  • returns None if failed

Return

  1. returns string slice beginning directly after the part, that was used to parse
  2. the NodeContainer resulting form the parsing

fn contained(&self) -> &T[src]

return reference to what the NodeContainer contains

fn contained_mut(&mut self) -> &mut T[src]

return mut reference to what the NodeContainer contains

fn neighbors(&self) -> IterWrapper[src]

returns iterator over indices of neighbors

fn degree(&self) -> usize[src]

count number of neighbors, i.e. number of edges incident to self

fn id(&self) -> u32[src]

returns id of container

Note:

(in Graph<T>: id equals the index corresponding to self)

fn is_adjacent(&self, other_id: &u32) -> bool[src]

check if vertex with other_id is adjacent to self

Note:

(in Graph<T>: id equals the index corresponding to self)

fn sort_adj(&mut self)[src]

Sorting adjecency lists

  • calls sort_unstable() on all adjecency lists

impl<T: Clone + Node> Clone for NodeContainer<T>[src]

impl<T: Debug + Node> Debug for NodeContainer<T>[src]

impl<T: Node> Display for NodeContainer<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for NodeContainer<T> where
    T: RefUnwindSafe

impl<T> Send for NodeContainer<T> where
    T: Send

impl<T> Sync for NodeContainer<T> where
    T: Sync

impl<T> Unpin for NodeContainer<T> where
    T: Unpin

impl<T> UnwindSafe for NodeContainer<T> where
    T: UnwindSafe

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> ToString for T where
    T: Display + ?Sized
[src]

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>,