Struct daggy::EdgeIndex
[−]
[src]
pub struct EdgeIndex<Ix = u32>(_);
Edge identifier.
Methods
impl<Ix> EdgeIndex<Ix> where
Ix: IndexType,
[src]
Ix: IndexType,
pub fn new(x: usize) -> EdgeIndex<Ix>
[src]
pub fn index(self) -> usize
[src]
pub fn end() -> EdgeIndex<Ix>
[src]
An invalid EdgeIndex
used to denote absence of an edge, for example
to end an adjacency list.
Trait Implementations
impl<Ix> Ord for EdgeIndex<Ix> where
Ix: Ord,
[src]
Ix: Ord,
fn cmp(&self, __arg_0: &EdgeIndex<Ix>) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl<Ix> PartialEq<EdgeIndex<Ix>> for EdgeIndex<Ix> where
Ix: PartialEq<Ix>,
[src]
Ix: PartialEq<Ix>,
fn eq(&self, __arg_0: &EdgeIndex<Ix>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &EdgeIndex<Ix>) -> bool
[src]
This method tests for !=
.
impl<Ix> Debug for EdgeIndex<Ix> where
Ix: Debug,
[src]
Ix: Debug,
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more
impl<Ix> Eq for EdgeIndex<Ix> where
Ix: Eq,
[src]
Ix: Eq,
impl<Ix> VisitMap<EdgeIndex<Ix>> for FixedBitSet where
Ix: IndexType,
[src]
Ix: IndexType,
fn visit(&mut self, x: EdgeIndex<Ix>) -> bool
[src]
Mark a
as visited. Read more
fn is_visited(&self, x: &EdgeIndex<Ix>) -> bool
[src]
Return whether a
has been visited before.
impl<Ix> Clone for EdgeIndex<Ix> where
Ix: Clone,
[src]
Ix: Clone,
fn clone(&self) -> EdgeIndex<Ix>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<Ix> PartialOrd<EdgeIndex<Ix>> for EdgeIndex<Ix> where
Ix: PartialOrd<Ix>,
[src]
Ix: PartialOrd<Ix>,
fn partial_cmp(&self, __arg_0: &EdgeIndex<Ix>) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &EdgeIndex<Ix>) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &EdgeIndex<Ix>) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &EdgeIndex<Ix>) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &EdgeIndex<Ix>) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<Ix> Serialize for EdgeIndex<Ix> where
Ix: IndexType + Serialize,
[src]
Ix: IndexType + Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
[src]
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<N, E, Ty, Ix> IndexMut<EdgeIndex<Ix>> for Graph<N, E, Ty, Ix> where
Ix: IndexType,
Ty: EdgeType,
[src]
Ix: IndexType,
Ty: EdgeType,
Index the Graph
by EdgeIndex
to access edge weights.
Panics if the edge doesn't exist.
ⓘImportant traits for &'a mut Wfn index_mut(&mut self, index: EdgeIndex<Ix>) -> &mut E
[src]
Performs the mutable indexing (container[index]
) operation.
impl<N, E, Ty, Ix> Index<EdgeIndex<Ix>> for Graph<N, E, Ty, Ix> where
Ix: IndexType,
Ty: EdgeType,
[src]
Ix: IndexType,
Ty: EdgeType,
Index the Graph
by EdgeIndex
to access edge weights.
Panics if the edge doesn't exist.
type Output = E
The returned type after indexing.
ⓘImportant traits for &'a mut Wfn index(&self, index: EdgeIndex<Ix>) -> &E
[src]
Performs the indexing (container[index]
) operation.
impl<Ix> Copy for EdgeIndex<Ix> where
Ix: Copy,
[src]
Ix: Copy,
impl<Ix> Hash for EdgeIndex<Ix> where
Ix: Hash,
[src]
Ix: Hash,
fn hash<__HIx>(&self, __arg_0: &mut __HIx) where
__HIx: Hasher,
[src]
__HIx: Hasher,
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<Ix> Default for EdgeIndex<Ix> where
Ix: Default,
[src]
Ix: Default,
impl<'de, Ix> Deserialize<'de> for EdgeIndex<Ix> where
Ix: IndexType + Deserialize<'de>,
[src]
Ix: IndexType + Deserialize<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<EdgeIndex<Ix>, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
[src]
deserializer: D
) -> Result<EdgeIndex<Ix>, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<Ix> GraphIndex for EdgeIndex<Ix> where
Ix: IndexType,
[src]
Ix: IndexType,
impl<N, E, Ix> Index<EdgeIndex<Ix>> for Dag<N, E, Ix> where
Ix: IndexType,
[src]
Ix: IndexType,
type Output = E
The returned type after indexing.
ⓘImportant traits for &'a mut Wfn index(&self, index: EdgeIndex<Ix>) -> &E
[src]
Performs the indexing (container[index]
) operation.
impl<N, E, Ix> IndexMut<EdgeIndex<Ix>> for Dag<N, E, Ix> where
Ix: IndexType,
[src]
Ix: IndexType,