Struct net_ensembles::sw_graph::SwEdge
source · [−]pub struct SwEdge { /* private fields */ }
Expand description
Implementations
sourceimpl SwEdge
impl SwEdge
sourcepub fn is_root(&self) -> bool
pub fn is_root(&self) -> bool
Is the edge a root edge?
- A root edge is an edge which will always be connected to the current node. Where it connects to can change, where it connects from cannot.
- In the original ring structure of an
SwGraph
created by theSwEnsemble
every edge is rooted at a node and every node has the same amount (2) of root edges
sourcepub fn is_at_root(&self) -> bool
pub fn is_at_root(&self) -> bool
Is the edge at its root position?
A root edge is an edge which will always be connected to the current node. Where it connects to can change, where it connects from cannot.
A root edge can be reset (i.e., where it connects to is reset) to its original neighbor (the next, or second next neighbor)
This checks, if the edge still connects to where it would be reset to anyway
sourcepub fn is_long_ranging_root(&self) -> bool
pub fn is_long_ranging_root(&self) -> bool
checks root edge it it is long ranging
- is it a root edge and if yes, is it a long ranging root edge?
- a long ranging root edge is defined as follows.
every edge can be in either of two states: root edge or not (see
is_root
). If the edge is not at its original position, it is counted as long ranging. We can only make statements about root edges, because we are missing information otherwise. Therefore this method will returntrue
if the edge is a root edge, which is not at its original position
Trait Implementations
sourceimpl<T> AdjList<SwEdge> for SwContainer<T>where
T: Node,
impl<T> AdjList<SwEdge> for SwContainer<T>where
T: Node,
sourcefn edges(&self) -> &[SwEdge]
fn edges(&self) -> &[SwEdge]
Intended for all AdjContainer, which store all their
edges in a continouse slice/vector. This will return
a reference to the edge slice, which you can use
to iterate or do other stuff Read more
sourceimpl<'de> Deserialize<'de> for SwEdge
impl<'de> Deserialize<'de> for SwEdge
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
impl Copy for SwEdge
Auto Trait Implementations
impl RefUnwindSafe for SwEdge
impl Send for SwEdge
impl Sync for SwEdge
impl Unpin for SwEdge
impl UnwindSafe for SwEdge
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