Struct daggy::petgraph::MinScored []

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, T> Debug for MinScored<K, T> where K: Debug, T: Debug

fn fmt(&self, __arg_0: &mut Formatter) -> Result<()Error>

Formats the value using the given formatter.

impl<K, T> Clone for MinScored<K, T> where K: Clone, T: Clone

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, T> Copy for MinScored<K, T> where K: Copy, T: Copy

impl<K, T> PartialEq<MinScored<K, T>> for MinScored<K, T> where K: PartialOrd<K>

fn eq(&self, other: &MinScored<K, T>) -> bool

impl<K, T> Eq for MinScored<K, T> where K: PartialOrd<K>

impl<K, T> PartialOrd<MinScored<K, T>> for MinScored<K, T> where K: PartialOrd<K>

fn partial_cmp(&self, other: &MinScored<K, T>) -> Option<Ordering>

impl<K, T> Ord for MinScored<K, T> where K: PartialOrd<K>

fn cmp(&self, other: &MinScored<K, T>) -> Ordering