use crate::integer::Integer;
use core::cmp::Ordering;
use malachite_base::num::comparison::traits::{
OrdAbs, OrdAbsDouble, OrdDouble, PartialOrdAbs, PartialOrdAbsDouble,
};
impl PartialOrdAbs for Integer {
#[inline]
fn partial_cmp_abs(&self, other: &Self) -> Option<Ordering> {
Some(self.cmp_abs(other))
}
}
impl OrdAbs for Integer {
#[inline]
fn cmp_abs(&self, other: &Self) -> Ordering {
self.abs.cmp(&other.abs)
}
}
impl OrdAbsDouble for Integer {
#[inline]
fn cmp_abs_double(&self, other: &Self) -> Ordering {
self.unsigned_abs_ref().cmp_double(other.unsigned_abs_ref())
}
}
impl PartialOrdAbsDouble for Integer {
#[inline]
fn partial_cmp_abs_double(&self, other: &Self) -> Option<Ordering> {
Some(self.cmp_abs_double(other))
}
}