[−][src]Struct net_ensembles::sw_graph::SwContainer
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
fromSwContainer<T>
- see trait
AdjContainer
Implementations
impl<T: Node + SerdeStateConform> SwContainer<T>
[src]
pub fn count_root(&self) -> usize
[src]
Count how many root edges are contained
Trait Implementations
impl<T> AdjContainer<T> for SwContainer<T> where
T: Node + SerdeStateConform,
[src]
T: Node + SerdeStateConform,
fn new(id: u32, node: T) -> Self
[src]
Create new instance with id
fn contained(&self) -> &T
[src]
return reference to what the AdjContainer contains
fn contained_mut(&mut self) -> &mut T
[src]
return mut reference to what the AdjContainer 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
fn get_adj_first(&self) -> Option<&u32>
[src]
returns Some(first element from the adjecency List)
or None
fn is_adjacent(&self, other_id: u32) -> bool
[src]
check if vertex with other_id
is adjacent to self
Note:
(in GenericGraph<T>
: id
equals the index corresponding to self
)
fn sort_adj(&mut self)
[src]
Sorting adjecency lists
- worst case:
O(edges log(edges))
impl<T: Clone + Node> Clone for SwContainer<T>
[src]
fn clone(&self) -> SwContainer<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Debug + Node> Debug for SwContainer<T>
[src]
impl<'de, T: Node> Deserialize<'de> for SwContainer<T> where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<T, E> GraphIterators<T, GenericGraph<T, SwContainer<T>>, SwContainer<T>> for E where
T: Node,
E: WithGraph<T, GenericGraph<T, SwContainer<T>>>,
[src]
T: Node,
E: WithGraph<T, GenericGraph<T, SwContainer<T>>>,
fn contained_iter(&self) -> ContainedIter<T, SwContainer<T>>
[src]
fn contained_iter_neighbors(
&self,
index: usize
) -> NContainedIter<T, SwContainer<T>>
[src]
&self,
index: usize
) -> NContainedIter<T, SwContainer<T>>
fn container_iter(&self) -> Iter<SwContainer<T>>
[src]
fn container_iter_neighbors(
&self,
index: usize
) -> NContainerIter<T, SwContainer<T>>
[src]
&self,
index: usize
) -> NContainerIter<T, SwContainer<T>>
fn dfs(&self, index: u32) -> Dfs<T, SwContainer<T>>
[src]
fn dfs_with_index(&self, index: u32) -> DfsWithIndex<T, SwContainer<T>>
[src]
fn bfs_index_depth(&self, index: u32) -> Bfs<T, SwContainer<T>>
[src]
impl<T, R> GraphIteratorsMut<T, GenericGraph<T, SwContainer<T>>, SwContainer<T>> for SwEnsemble<T, R> where
T: Node + SerdeStateConform,
R: Rng,
[src]
T: Node + SerdeStateConform,
R: Rng,
fn contained_iter_neighbors_mut(
&mut self,
index: usize
) -> NContainedIterMut<T, SwContainer<T>>
[src]
&mut self,
index: usize
) -> NContainedIterMut<T, SwContainer<T>>
fn contained_iter_neighbors_mut_with_index(
&mut self,
index: usize
) -> INContainedIterMut<T, SwContainer<T>>
[src]
&mut self,
index: usize
) -> INContainedIterMut<T, SwContainer<T>>
fn contained_iter_mut(&mut self) -> ContainedIterMut<T, SwContainer<T>>
[src]
impl<T: Node> Serialize for SwContainer<T> where
T: Serialize,
[src]
T: Serialize,
Auto Trait Implementations
impl<T> RefUnwindSafe for SwContainer<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for SwContainer<T> where
T: Send,
T: Send,
impl<T> Sync for SwContainer<T> where
T: Sync,
T: Sync,
impl<T> Unpin for SwContainer<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for SwContainer<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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SerdeStateConform for T where
T: Serialize,
[src]
T: Serialize,
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, 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>,