Struct outils::types::Edge [−][src]
pub struct Edge<Ix = DefaultIndexType> { /* fields omitted */ }
Light-weight, read-only type holding an edge index and the two vertices connected
by the indexed edge, i.e. e = (v, w)
Methods
impl<Ix> Edge<Ix> where
Ix: IndexType,
[src]
impl<Ix> Edge<Ix> where
Ix: IndexType,
pub fn new(
index: EdgeIndex<Ix>,
src: VertexIndex<Ix>,
dst: VertexIndex<Ix>
) -> Self
[src]
pub fn new(
index: EdgeIndex<Ix>,
src: VertexIndex<Ix>,
dst: VertexIndex<Ix>
) -> Self
Construct a new Edge
from an edge index value and the two vertex indices connected
by the new edge, i.e. e = (src, dst)
.
pub fn index(&self) -> EdgeIndex<Ix>
[src]
pub fn index(&self) -> EdgeIndex<Ix>
Returns the wrapped edge index value
pub fn src(&self) -> VertexIndex<Ix>
[src]
pub fn src(&self) -> VertexIndex<Ix>
Returns the wrapped index of the source vertex
pub fn dst(&self) -> VertexIndex<Ix>
[src]
pub fn dst(&self) -> VertexIndex<Ix>
Returns the wrapped index of the destination vertex
Trait Implementations
impl<Ix: Copy> Copy for Edge<Ix>
[src]
impl<Ix: Copy> Copy for Edge<Ix>
impl<Ix: Clone> Clone for Edge<Ix>
[src]
impl<Ix: Clone> Clone for Edge<Ix>
fn clone(&self) -> Edge<Ix>
[src]
fn clone(&self) -> Edge<Ix>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<Ix: Debug> Debug for Edge<Ix>
[src]
impl<Ix: Debug> Debug for Edge<Ix>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<Ix: Default> Default for Edge<Ix>
[src]
impl<Ix: Default> Default for Edge<Ix>
impl<Ix: PartialEq> PartialEq for Edge<Ix>
[src]
impl<Ix: PartialEq> PartialEq for Edge<Ix>
fn eq(&self, other: &Edge<Ix>) -> bool
[src]
fn eq(&self, other: &Edge<Ix>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Edge<Ix>) -> bool
[src]
fn ne(&self, other: &Edge<Ix>) -> bool
This method tests for !=
.
impl<Ix: PartialOrd> PartialOrd for Edge<Ix>
[src]
impl<Ix: PartialOrd> PartialOrd for Edge<Ix>
fn partial_cmp(&self, other: &Edge<Ix>) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Edge<Ix>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Edge<Ix>) -> bool
[src]
fn lt(&self, other: &Edge<Ix>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Edge<Ix>) -> bool
[src]
fn le(&self, other: &Edge<Ix>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Edge<Ix>) -> bool
[src]
fn gt(&self, other: &Edge<Ix>) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Edge<Ix>) -> bool
[src]
fn ge(&self, other: &Edge<Ix>) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<Ix: Eq> Eq for Edge<Ix>
[src]
impl<Ix: Eq> Eq for Edge<Ix>
impl<Ix: Ord> Ord for Edge<Ix>
[src]
impl<Ix: Ord> Ord for Edge<Ix>
fn cmp(&self, other: &Edge<Ix>) -> Ordering
[src]
fn cmp(&self, other: &Edge<Ix>) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl<Ix: Hash> Hash for Edge<Ix>
[src]
impl<Ix: Hash> Hash for Edge<Ix>