[−][src]Struct net_ensembles::graph::NodeContainer
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
fromNodeContainer<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
- returns string slice beginning directly after the part, that was used to parse
- 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]
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
fn get_adj_first(&self) -> Option<&u32>
[src]
impl<T: Clone + Node> Clone for NodeContainer<T>
[src]
fn clone(&self) -> NodeContainer<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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,
T: RefUnwindSafe,
impl<T> Send for NodeContainer<T> where
T: Send,
T: Send,
impl<T> Sync for NodeContainer<T> where
T: Sync,
T: Sync,
impl<T> Unpin for NodeContainer<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for NodeContainer<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,