Struct petgraph::MinScored
[−]
[src]
pub struct MinScored<K, T>(pub K, pub T);
MinScored<K, T> holds a score K and a scored object T in
a pair for use with a BinaryHeap.
MinScored compares in reverse order by the score, so that we can use BinaryHeap as a min-heap to extract the score-value pair with the least score.
Note: MinScored implements a total order (Ord), so that it is possible
to use float types as scores.
Trait Implementations
impl<K: Debug, T: Debug> Debug for MinScored<K, T>[src]
impl<K: Clone, T: Clone> Clone for MinScored<K, T>[src]
fn clone(&self) -> MinScored<K, T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl<K: Copy, T: Copy> Copy for MinScored<K, T>[src]
impl<K: PartialOrd, T> PartialEq for MinScored<K, T>[src]
fn eq(&self, other: &MinScored<K, T>) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0
This method tests for !=.
impl<K: PartialOrd, T> Eq for MinScored<K, T>[src]
impl<K: PartialOrd, T> PartialOrd for MinScored<K, T>[src]
fn partial_cmp(&self, other: &MinScored<K, T>) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool1.0.0
This method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &Rhs) -> bool1.0.0
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &Rhs) -> bool1.0.0
This method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &Rhs) -> bool1.0.0
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more