Struct net_ensembles::spacial::SpacialNodeContainer
source · [−]pub struct SpacialNodeContainer<T> { /* private fields */ }
Expand description
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
Implementations
Trait Implementations
sourceimpl<T: Node + SerdeStateConform> AdjContainer<T> for SpacialNodeContainer<T>
impl<T: Node + SerdeStateConform> AdjContainer<T> for SpacialNodeContainer<T>
sourcefn contained_mut(&mut self) -> &mut T
fn contained_mut(&mut self) -> &mut T
return mut reference to what the NodeContainer contains
sourcefn neighbors(&self) -> IterWrapper<'_>ⓘNotable traits for IterWrapper<'a>impl<'a> Iterator for IterWrapper<'a> type Item = &'a usize;
fn neighbors(&self) -> IterWrapper<'_>ⓘNotable traits for IterWrapper<'a>impl<'a> Iterator for IterWrapper<'a> type Item = &'a usize;
returns iterator over indices of neighbors
sourcefn is_adjacent(&self, other_id: usize) -> bool
fn is_adjacent(&self, other_id: usize) -> bool
check if vertex with other_id
is adjacent to self
Note:
(in Graph<T>
: id
equals the index corresponding to self
)
sourcefn sort_adj(&mut self)
fn sort_adj(&mut self)
Sorting adjecency lists
- calls
sort_unstable()
on all adjecency lists
sourcefn shuffle_adj<R: Rng>(&mut self, rng: &mut R)
fn shuffle_adj<R: Rng>(&mut self, rng: &mut R)
shuffle adjacency list
sourcefn get_adj_first(&self) -> Option<&usize>
fn get_adj_first(&self) -> Option<&usize>
returns
Some(first element from the adjecency List)
or None
sourceimpl<T: Clone> Clone for SpacialNodeContainer<T>
impl<T: Clone> Clone for SpacialNodeContainer<T>
sourcefn clone(&self) -> SpacialNodeContainer<T>
fn clone(&self) -> SpacialNodeContainer<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<T: Debug> Debug for SpacialNodeContainer<T>
impl<T: Debug> Debug for SpacialNodeContainer<T>
sourceimpl<'de, T> Deserialize<'de> for SpacialNodeContainer<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for SpacialNodeContainer<T>where
T: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for SpacialNodeContainer<T>where
T: RefUnwindSafe,
impl<T> Send for SpacialNodeContainer<T>where
T: Send,
impl<T> Sync for SpacialNodeContainer<T>where
T: Sync,
impl<T> Unpin for SpacialNodeContainer<T>where
T: Unpin,
impl<T> UnwindSafe for SpacialNodeContainer<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
fn cast_trunc(self) -> T
fn cast_trunc(self) -> T
Cast to integer, truncating Read more
fn cast_nearest(self) -> T
fn cast_nearest(self) -> T
Cast to the nearest integer Read more
fn cast_floor(self) -> T
fn cast_floor(self) -> T
Cast the floor to an integer Read more
fn try_cast_trunc(self) -> Result<T, Error>
fn try_cast_trunc(self) -> Result<T, Error>
Try converting to integer with truncation Read more
fn try_cast_nearest(self) -> Result<T, Error>
fn try_cast_nearest(self) -> Result<T, Error>
Try converting to the nearest integer Read more
fn try_cast_floor(self) -> Result<T, Error>
fn try_cast_floor(self) -> Result<T, Error>
Try converting the floor to an integer Read more
fn try_cast_ceil(self) -> Result<T, Error>
fn try_cast_ceil(self) -> Result<T, Error>
Try convert the ceiling to an integer Read more