use super::structures::NodeInfo;
use std::cmp::Ordering;
#[cfg(test)]
mod test;
impl PartialEq for NodeInfo {
fn eq(
&self,
other: &Self,
) -> bool {
self.total_cost.eq(&other.total_cost)
}
}
impl PartialOrd for NodeInfo {
fn lt(
&self,
other: &Self,
) -> bool {
self.total_cost.lt(&other.total_cost)
}
fn le(
&self,
other: &Self,
) -> bool {
self.total_cost.le(&other.total_cost)
}
fn gt(
&self,
other: &Self,
) -> bool {
self.total_cost.gt(&other.total_cost)
}
fn ge(
&self,
other: &Self,
) -> bool {
self.total_cost.ge(&other.total_cost)
}
fn partial_cmp(
&self,
other: &Self,
) -> Option<Ordering> {
self.total_cost.partial_cmp(&other.total_cost)
}
}