Struct diffgeom::typenum::NInt []

pub struct NInt<U> where
    U: NonZero + Unsigned
{ /* fields omitted */ }

Type-level signed integers with negative sign.

Methods

impl<U> NInt<U> where
    U: NonZero + Unsigned

Instantiates a singleton representing this strictly negative integer.

Trait Implementations

impl<U> Clone for NInt<U> where
    U: NonZero + Unsigned + Clone

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<Nl, Nr> Cmp<NInt<Nr>> for NInt<Nl> where
    Nl: NonZero + Unsigned,
    Nr: NonZero + Unsigned + Cmp<Nl>, 

-X <==> -Y

The result of the comparison. It should only ever be one of Greater, Less, or Equal.

impl<P, N> Cmp<PInt<P>> for NInt<N> where
    N: NonZero + Unsigned,
    P: NonZero + Unsigned

-X < Y

The result of the comparison. It should only ever be one of Greater, Less, or Equal.

impl<U> Cmp<Z0> for NInt<U> where
    U: NonZero + Unsigned

-X < 0

The result of the comparison. It should only ever be one of Greater, Less, or Equal.

impl<U> Add<Z0> for NInt<U> where
    U: NonZero + Unsigned

NInt + Z0 = NInt

The resulting type after applying the + operator

The method for the + operator

impl<Ul, Ur> Add<NInt<Ur>> for NInt<Ul> where
    Ul: NonZero + Unsigned + Add<Ur>,
    Ur: NonZero + Unsigned,
    <Ul as Add<Ur>>::Output: Unsigned,
    <Ul as Add<Ur>>::Output: NonZero

N(Ul) + N(Ur) = N(Ul + Ur)

The resulting type after applying the + operator

The method for the + operator

impl<Ul, Ur> Add<PInt<Ur>> for NInt<Ul> where
    Ul: NonZero + Unsigned,
    Ur: NonZero + Unsigned + Cmp<Ul> + PrivateIntegerAdd<<Ur as Cmp<Ul>>::Output, Ul>, 

N(Ul) + P(Ur): We resolve this with our PrivateAdd

The resulting type after applying the + operator

The method for the + operator

impl<U> Debug for NInt<U> where
    U: NonZero + Unsigned + Debug

Formats the value using the given formatter.

impl<U> Neg for NInt<U> where
    U: NonZero + Unsigned

-NInt = PInt

impl<U> Pow<NInt<UInt<U, B0>>> for NInt<UInt<UTerm, B1>> where
    U: Unsigned

(-1)N = 1 if N is even

The result of the exponentiation.

This function isn't used in this crate, but may be useful for others. It is implemented for primitives. Read more

impl<U> Pow<Z0> for NInt<U> where
    U: NonZero + Unsigned

N0 = 1

The result of the exponentiation.

This function isn't used in this crate, but may be useful for others. It is implemented for primitives. Read more

impl<Ul, Ur> Pow<PInt<UInt<Ur, B1>>> for NInt<Ul> where
    Ul: NonZero + Unsigned + Pow<UInt<Ur, B1>>,
    Ur: Unsigned,
    <Ul as Pow<UInt<Ur, B1>>>::Output: Unsigned,
    <Ul as Pow<UInt<Ur, B1>>>::Output: NonZero

N(Ul)P(Ur) = N(UlUr) if Ur is odd

The result of the exponentiation.

This function isn't used in this crate, but may be useful for others. It is implemented for primitives. Read more

impl<Ul, Ur> Pow<PInt<UInt<Ur, B0>>> for NInt<Ul> where
    Ul: NonZero + Unsigned + Pow<UInt<Ur, B0>>,
    Ur: Unsigned,
    <Ul as Pow<UInt<Ur, B0>>>::Output: Unsigned,
    <Ul as Pow<UInt<Ur, B0>>>::Output: NonZero

N(Ul)P(Ur) = P(UlUr) if Ur is even

The result of the exponentiation.

This function isn't used in this crate, but may be useful for others. It is implemented for primitives. Read more

impl<U> Pow<NInt<UInt<U, B1>>> for NInt<UInt<UTerm, B1>> where
    U: Unsigned

(-1)N = -1 if N is odd

The result of the exponentiation.

This function isn't used in this crate, but may be useful for others. It is implemented for primitives. Read more

impl<U> Eq for NInt<U> where
    U: NonZero + Unsigned + Eq

impl<Ul, Ur> Min<PInt<Ur>> for NInt<Ul> where
    Ul: Unsigned + NonZero,
    Ur: Unsigned + NonZero

The type of the minimum of Self and Rhs

Method returning the minimum

impl<Ul, Ur> Min<NInt<Ur>> for NInt<Ul> where
    Ul: Unsigned + NonZero + Max<Ur>,
    Ur: Unsigned + NonZero,
    <Ul as Max<Ur>>::Output: Unsigned,
    <Ul as Max<Ur>>::Output: NonZero

The type of the minimum of Self and Rhs

Method returning the minimum

impl<U> Min<Z0> for NInt<U> where
    U: Unsigned + NonZero

The type of the minimum of Self and Rhs

Method returning the minimum

impl<Ul, Ur> Rem<PInt<Ur>> for NInt<Ul> where
    Ul: NonZero + Unsigned + Rem<Ur>,
    Ur: NonZero + Unsigned,
    NInt<Ul>: PrivateRem<<Ul as Rem<Ur>>::Output, PInt<Ur>>, 

$A<Ul> % $B<Ur> = $R<Ul % Ur>

impl<Ul, Ur> Rem<NInt<Ur>> for NInt<Ul> where
    Ul: NonZero + Unsigned + Rem<Ur>,
    Ur: NonZero + Unsigned,
    NInt<Ul>: PrivateRem<<Ul as Rem<Ur>>::Output, NInt<Ur>>, 

$A<Ul> % $B<Ur> = $R<Ul % Ur>

impl<U> Integer for NInt<U> where
    U: NonZero + Unsigned

impl<V, A, U> Mul<TArr<V, A>> for NInt<U> where
    U: Unsigned + NonZero,
    NInt<U>: Mul<A>,
    NInt<U>: Mul<V>, 

The resulting type after applying the * operator

The method for the * operator

impl<U> Mul<ATerm> for NInt<U> where
    U: Unsigned + NonZero

The resulting type after applying the * operator

The method for the * operator

impl<Ul, Ur> Mul<NInt<Ur>> for NInt<Ul> where
    Ul: NonZero + Unsigned + Mul<Ur>,
    Ur: NonZero + Unsigned,
    <Ul as Mul<Ur>>::Output: Unsigned,
    <Ul as Mul<Ur>>::Output: NonZero

N(Ul) * N(Ur) = P(Ul * Ur)

The resulting type after applying the * operator

The method for the * operator

impl<Ul, Ur> Mul<PInt<Ur>> for NInt<Ul> where
    Ul: NonZero + Unsigned + Mul<Ur>,
    Ur: NonZero + Unsigned,
    <Ul as Mul<Ur>>::Output: Unsigned,
    <Ul as Mul<Ur>>::Output: NonZero

N(Ul) * P(Ur) = N(Ul * Ur)

The resulting type after applying the * operator

The method for the * operator

impl<U> Mul<Z0> for NInt<U> where
    U: NonZero + Unsigned

N * Z0 = Z0

The resulting type after applying the * operator

The method for the * operator

impl<Ul, Ur> Div<PInt<Ur>> for NInt<Ul> where
    Ul: NonZero + Unsigned + Cmp<Ur>,
    Ur: NonZero + Unsigned,
    NInt<Ul>: PrivateDivInt<<Ul as Cmp<Ur>>::Output, PInt<Ur>>, 

$A<Ul> / $B<Ur> = $R<Ul / Ur>

The resulting type after applying the / operator

The method for the / operator

impl<Ul, Ur> Div<NInt<Ur>> for NInt<Ul> where
    Ul: NonZero + Unsigned + Cmp<Ur>,
    Ur: NonZero + Unsigned,
    NInt<Ul>: PrivateDivInt<<Ul as Cmp<Ur>>::Output, NInt<Ur>>, 

$A<Ul> / $B<Ur> = $R<Ul / Ur>

The resulting type after applying the / operator

The method for the / operator

impl<U> Default for NInt<U> where
    U: NonZero + Unsigned + Default

impl<U> NonZero for NInt<U> where
    U: NonZero + Unsigned

impl<U> PartialOrd<NInt<U>> for NInt<U> where
    U: NonZero + Unsigned + PartialOrd<U>, 

impl<U> Hash for NInt<U> where
    U: NonZero + Unsigned + Hash

impl<U> PartialEq<NInt<U>> for NInt<U> where
    U: NonZero + Unsigned + PartialEq<U>, 

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<Ul, Ur> Max<PInt<Ur>> for NInt<Ul> where
    Ul: Unsigned + NonZero,
    Ur: Unsigned + NonZero

The type of the maximum of Self and Rhs

Method returning the maximum

impl<U> Max<Z0> for NInt<U> where
    U: Unsigned + NonZero

The type of the maximum of Self and Rhs

Method returning the maximum

impl<Ul, Ur> Max<NInt<Ur>> for NInt<Ul> where
    Ul: Unsigned + NonZero + Min<Ur>,
    Ur: Unsigned + NonZero,
    <Ul as Min<Ur>>::Output: Unsigned,
    <Ul as Min<Ur>>::Output: NonZero

The type of the maximum of Self and Rhs

Method returning the maximum

impl<U> Abs for NInt<U> where
    U: NonZero + Unsigned

The absolute value.

impl<Ul, Ur> Sub<PInt<Ur>> for NInt<Ul> where
    Ul: NonZero + Unsigned + Add<Ur>,
    Ur: NonZero + Unsigned,
    <Ul as Add<Ur>>::Output: Unsigned,
    <Ul as Add<Ur>>::Output: NonZero

N(Ul) - P(Ur) = N(Ul + Ur)

The resulting type after applying the - operator

The method for the - operator

impl<U> Sub<Z0> for NInt<U> where
    U: NonZero + Unsigned

NInt - Z0 = NInt

The resulting type after applying the - operator

The method for the - operator

impl<Ul, Ur> Sub<NInt<Ur>> for NInt<Ul> where
    Ul: NonZero + Unsigned,
    Ur: NonZero + Unsigned + Cmp<Ul> + PrivateIntegerAdd<<Ur as Cmp<Ul>>::Output, Ul>, 

N(Ul) - N(Ur): We resolve this with our PrivateAdd

The resulting type after applying the - operator

The method for the - operator

impl<U> Ord for NInt<U> where
    U: NonZero + Unsigned + Ord

impl<U> Copy for NInt<U> where
    U: NonZero + Unsigned + Copy