pub struct MinScored<K, T>(pub K, pub T);Expand description
Wrapper for priority queue ordering (min-heap behavior).
Rust’s BinaryHeap is a max-heap, so we reverse the ordering
to get min-heap behavior for Dijkstra and A*.
Tuple Fields§
§0: K§1: TImplementations§
Trait Implementations§
Source§impl<K: PartialOrd, T> Ord for MinScored<K, T>
impl<K: PartialOrd, T> Ord for MinScored<K, T>
Source§impl<K: PartialOrd, T> PartialEq for MinScored<K, T>
impl<K: PartialOrd, T> PartialEq for MinScored<K, T>
Source§impl<K: PartialOrd, T> PartialOrd for MinScored<K, T>
impl<K: PartialOrd, T> PartialOrd for MinScored<K, T>
impl<K: Copy, T: Copy> Copy for MinScored<K, T>
impl<K: PartialOrd, T> Eq for MinScored<K, T>
Auto Trait Implementations§
impl<K, T> Freeze for MinScored<K, T>
impl<K, T> RefUnwindSafe for MinScored<K, T>where
K: RefUnwindSafe,
T: RefUnwindSafe,
impl<K, T> Send for MinScored<K, T>
impl<K, T> Sync for MinScored<K, T>
impl<K, T> Unpin for MinScored<K, T>
impl<K, T> UnwindSafe for MinScored<K, T>where
K: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.