Trait malachite_base::num::comparison::traits::PartialOrdAbs
source · [−]pub trait PartialOrdAbs<Rhs: ?Sized = Self> {
fn partial_cmp_abs(&self, other: &Rhs) -> Option<Ordering>;
fn lt_abs(&self, other: &Rhs) -> bool { ... }
fn le_abs(&self, other: &Rhs) -> bool { ... }
fn gt_abs(&self, other: &Rhs) -> bool { ... }
fn ge_abs(&self, other: &Rhs) -> bool { ... }
}
Expand description
Determines equality between the absolute values of two numbers, where some pairs of numbers may not be comparable.
Required Methods
fn partial_cmp_abs(&self, other: &Rhs) -> Option<Ordering>
fn partial_cmp_abs(&self, other: &Rhs) -> Option<Ordering>
Compares the absolute values of two numbers, taking both by reference.
If the two values are not comparable, None
is returned.
Provided Methods
Determines whether the absolute value of one number is less than the absolute value of another.
Worst-case complexity
Same as the time and additional memory complexity of
partial_cmp_abs
.
Determines whether the absolute value of one number is less than or equal to the absolute value of another.
Worst-case complexity
Same as the time and additional memory complexity of
partial_cmp_abs
.
Determines whether the absolute value of one number is greater than the absolute value of another.
Worst-case complexity
Same as the time and additional memory complexity of
partial_cmp_abs
.
Determines whether the absolute value of one number is greater than or equal to the absolute value of another.
Worst-case complexity
Same as the time and additional memory complexity of
partial_cmp_abs
.
Implementations on Foreign Types
sourceimpl PartialOrdAbs<u8> for u8
impl PartialOrdAbs<u8> for u8
sourcefn partial_cmp_abs(&self, other: &u8) -> Option<Ordering>
fn partial_cmp_abs(&self, other: &u8) -> Option<Ordering>
Compares the absolute values of two numbers, taking both by reference.
The PartialOrdAbs
interface allows for pairs of
incomparable elements, but for primitive integers these never occur.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl PartialOrdAbs<u16> for u16
impl PartialOrdAbs<u16> for u16
sourcefn partial_cmp_abs(&self, other: &u16) -> Option<Ordering>
fn partial_cmp_abs(&self, other: &u16) -> Option<Ordering>
Compares the absolute values of two numbers, taking both by reference.
The PartialOrdAbs
interface allows for pairs of
incomparable elements, but for primitive integers these never occur.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl PartialOrdAbs<u32> for u32
impl PartialOrdAbs<u32> for u32
sourcefn partial_cmp_abs(&self, other: &u32) -> Option<Ordering>
fn partial_cmp_abs(&self, other: &u32) -> Option<Ordering>
Compares the absolute values of two numbers, taking both by reference.
The PartialOrdAbs
interface allows for pairs of
incomparable elements, but for primitive integers these never occur.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl PartialOrdAbs<u64> for u64
impl PartialOrdAbs<u64> for u64
sourcefn partial_cmp_abs(&self, other: &u64) -> Option<Ordering>
fn partial_cmp_abs(&self, other: &u64) -> Option<Ordering>
Compares the absolute values of two numbers, taking both by reference.
The PartialOrdAbs
interface allows for pairs of
incomparable elements, but for primitive integers these never occur.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl PartialOrdAbs<u128> for u128
impl PartialOrdAbs<u128> for u128
sourcefn partial_cmp_abs(&self, other: &u128) -> Option<Ordering>
fn partial_cmp_abs(&self, other: &u128) -> Option<Ordering>
Compares the absolute values of two numbers, taking both by reference.
The PartialOrdAbs
interface allows for pairs of
incomparable elements, but for primitive integers these never occur.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl PartialOrdAbs<usize> for usize
impl PartialOrdAbs<usize> for usize
sourcefn partial_cmp_abs(&self, other: &usize) -> Option<Ordering>
fn partial_cmp_abs(&self, other: &usize) -> Option<Ordering>
Compares the absolute values of two numbers, taking both by reference.
The PartialOrdAbs
interface allows for pairs of
incomparable elements, but for primitive integers these never occur.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl PartialOrdAbs<i8> for i8
impl PartialOrdAbs<i8> for i8
sourcefn partial_cmp_abs(&self, other: &i8) -> Option<Ordering>
fn partial_cmp_abs(&self, other: &i8) -> Option<Ordering>
Compares the absolute values of two numbers, taking both by reference.
The PartialOrdAbs
interface allows for pairs of
incomparable elements, but for primitive integers these never occur.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl PartialOrdAbs<i16> for i16
impl PartialOrdAbs<i16> for i16
sourcefn partial_cmp_abs(&self, other: &i16) -> Option<Ordering>
fn partial_cmp_abs(&self, other: &i16) -> Option<Ordering>
Compares the absolute values of two numbers, taking both by reference.
The PartialOrdAbs
interface allows for pairs of
incomparable elements, but for primitive integers these never occur.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl PartialOrdAbs<i32> for i32
impl PartialOrdAbs<i32> for i32
sourcefn partial_cmp_abs(&self, other: &i32) -> Option<Ordering>
fn partial_cmp_abs(&self, other: &i32) -> Option<Ordering>
Compares the absolute values of two numbers, taking both by reference.
The PartialOrdAbs
interface allows for pairs of
incomparable elements, but for primitive integers these never occur.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl PartialOrdAbs<i64> for i64
impl PartialOrdAbs<i64> for i64
sourcefn partial_cmp_abs(&self, other: &i64) -> Option<Ordering>
fn partial_cmp_abs(&self, other: &i64) -> Option<Ordering>
Compares the absolute values of two numbers, taking both by reference.
The PartialOrdAbs
interface allows for pairs of
incomparable elements, but for primitive integers these never occur.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl PartialOrdAbs<i128> for i128
impl PartialOrdAbs<i128> for i128
sourcefn partial_cmp_abs(&self, other: &i128) -> Option<Ordering>
fn partial_cmp_abs(&self, other: &i128) -> Option<Ordering>
Compares the absolute values of two numbers, taking both by reference.
The PartialOrdAbs
interface allows for pairs of
incomparable elements, but for primitive integers these never occur.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl PartialOrdAbs<isize> for isize
impl PartialOrdAbs<isize> for isize
sourcefn partial_cmp_abs(&self, other: &isize) -> Option<Ordering>
fn partial_cmp_abs(&self, other: &isize) -> Option<Ordering>
Compares the absolute values of two numbers, taking both by reference.
The PartialOrdAbs
interface allows for pairs of
incomparable elements, but for primitive integers these never occur.
Worst-case complexity
Constant time and additional memory.
Examples
See here.