Skip to main content

Binary

Enum Binary 

Source
pub enum Binary {
    Zero,
    One,
}
Expand description

§Binary

A number that is either 0 or 1, stored in a single byte.

Used primarily for the cost in the artificial tableau, where a variable is either minimised out of the basis or ignored. The same shape appears in a matrix provider whose coefficients can only be 0 or 1: an incidence matrix, or a set cover. Storing a rational number for such a coefficient wastes both space and time, so this type stores it in a byte and lets Absorb apply it to a wide accumulator directly — adding a Zero is nothing at all, multiplying by a One is a clone.

The variants are declared in increasing numeric order, so the derived Ord is the order of the integers they stand for. Do not reorder them.

See also the documentation in relp::algorithm::two_phase::tableau::kind::artificial::Cost.

§Absent traits

There is deliberately no Neg and no Negateable impl: -1 is not a value this type can represent, so negating One would have to lie about its result. Use SignedOne when the coefficient can have either sign.

There is also no Add<Binary> for Binary, and hence no num_traits::Zero or num_traits::One: One + One is 2, which this type cannot represent. The only addition that makes sense is into a type that can hold the result, which is what Absorb and the Add<Binary> for i32-style impls below do.

Variants§

§

Zero

0.

§

One

1.

Trait Implementations§

Source§

impl Absorb<Binary> for Rational8

Source§

fn from_narrow(narrow: &Binary) -> Self

The narrow value in the wide type.
Source§

fn add_narrow(&mut self, narrow: &Binary)

Add a narrow value to this one.
Source§

fn sub_narrow(&mut self, narrow: &Binary)

Subtract a narrow value from this one.
Source§

fn mul_narrow(&self, narrow: &Binary) -> Self

Multiply this value by a narrow one.
Source§

fn add_mul_narrow(&mut self, narrow: &Binary, other: &Self)

Add the product of a narrow value and a wide one to this value. Read more
Source§

impl Absorb<Binary> for Rational16

Source§

fn from_narrow(narrow: &Binary) -> Self

The narrow value in the wide type.
Source§

fn add_narrow(&mut self, narrow: &Binary)

Add a narrow value to this one.
Source§

fn sub_narrow(&mut self, narrow: &Binary)

Subtract a narrow value from this one.
Source§

fn mul_narrow(&self, narrow: &Binary) -> Self

Multiply this value by a narrow one.
Source§

fn add_mul_narrow(&mut self, narrow: &Binary, other: &Self)

Add the product of a narrow value and a wide one to this value. Read more
Source§

impl Absorb<Binary> for Rational32

Source§

fn from_narrow(narrow: &Binary) -> Self

The narrow value in the wide type.
Source§

fn add_narrow(&mut self, narrow: &Binary)

Add a narrow value to this one.
Source§

fn sub_narrow(&mut self, narrow: &Binary)

Subtract a narrow value from this one.
Source§

fn mul_narrow(&self, narrow: &Binary) -> Self

Multiply this value by a narrow one.
Source§

fn add_mul_narrow(&mut self, narrow: &Binary, other: &Self)

Add the product of a narrow value and a wide one to this value. Read more
Source§

impl Absorb<Binary> for Rational64

Source§

fn from_narrow(narrow: &Binary) -> Self

The narrow value in the wide type.
Source§

fn add_narrow(&mut self, narrow: &Binary)

Add a narrow value to this one.
Source§

fn sub_narrow(&mut self, narrow: &Binary)

Subtract a narrow value from this one.
Source§

fn mul_narrow(&self, narrow: &Binary) -> Self

Multiply this value by a narrow one.
Source§

fn add_mul_narrow(&mut self, narrow: &Binary, other: &Self)

Add the product of a narrow value and a wide one to this value. Read more
Source§

impl Absorb<Binary> for Rational128

Source§

fn from_narrow(narrow: &Binary) -> Self

The narrow value in the wide type.
Source§

fn add_narrow(&mut self, narrow: &Binary)

Add a narrow value to this one.
Source§

fn sub_narrow(&mut self, narrow: &Binary)

Subtract a narrow value from this one.
Source§

fn mul_narrow(&self, narrow: &Binary) -> Self

Multiply this value by a narrow one.
Source§

fn add_mul_narrow(&mut self, narrow: &Binary, other: &Self)

Add the product of a narrow value and a wide one to this value. Read more
Source§

impl<const S: usize> Absorb<Binary> for Big<S>

Source§

fn from_narrow(narrow: &Binary) -> Self

The narrow value in the wide type.
Source§

fn add_narrow(&mut self, narrow: &Binary)

Add a narrow value to this one.
Source§

fn sub_narrow(&mut self, narrow: &Binary)

Subtract a narrow value from this one.
Source§

fn mul_narrow(&self, narrow: &Binary) -> Self

Multiply this value by a narrow one.
Source§

fn add_mul_narrow(&mut self, narrow: &Binary, other: &Self)

Add the product of a narrow value and a wide one to this value. Read more
Source§

impl Add<&Binary> for i8

Source§

type Output = i8

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Binary) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&Binary> for i16

Source§

type Output = i16

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Binary) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&Binary> for i32

Source§

type Output = i32

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Binary) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&Binary> for i64

Source§

type Output = i64

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Binary) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&Binary> for i128

Source§

type Output = i128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Binary) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&Binary> for u8

Source§

type Output = u8

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Binary) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&Binary> for u16

Source§

type Output = u16

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Binary) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&Binary> for u32

Source§

type Output = u32

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Binary) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&Binary> for u64

Source§

type Output = u64

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Binary) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&Binary> for u128

Source§

type Output = u128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Binary) -> Self::Output

Performs the + operation. Read more
Source§

impl<const S: usize> Add<&Binary> for Big<S>

Source§

type Output = Ratio<Sign, Ubig<S>, NonZeroUbig<S>>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Binary) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<Binary> for i8

Source§

type Output = i8

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Binary) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<Binary> for i16

Source§

type Output = i16

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Binary) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<Binary> for i32

Source§

type Output = i32

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Binary) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<Binary> for i64

Source§

type Output = i64

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Binary) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<Binary> for i128

Source§

type Output = i128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Binary) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<Binary> for u8

Source§

type Output = u8

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Binary) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<Binary> for u16

Source§

type Output = u16

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Binary) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<Binary> for u32

Source§

type Output = u32

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Binary) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<Binary> for u64

Source§

type Output = u64

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Binary) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<Binary> for u128

Source§

type Output = u128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Binary) -> Self::Output

Performs the + operation. Read more
Source§

impl<const S: usize> Add<Binary> for Big<S>

Source§

type Output = Ratio<Sign, Ubig<S>, NonZeroUbig<S>>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Binary) -> Self::Output

Performs the + operation. Read more
Source§

impl AddAssign<&Binary> for i8

Source§

fn add_assign(&mut self, rhs: &Binary)

Performs the += operation. Read more
Source§

impl AddAssign<&Binary> for i16

Source§

fn add_assign(&mut self, rhs: &Binary)

Performs the += operation. Read more
Source§

impl AddAssign<&Binary> for i32

Source§

fn add_assign(&mut self, rhs: &Binary)

Performs the += operation. Read more
Source§

impl AddAssign<&Binary> for i64

Source§

fn add_assign(&mut self, rhs: &Binary)

Performs the += operation. Read more
Source§

impl AddAssign<&Binary> for i128

Source§

fn add_assign(&mut self, rhs: &Binary)

Performs the += operation. Read more
Source§

impl AddAssign<&Binary> for u8

Source§

fn add_assign(&mut self, rhs: &Binary)

Performs the += operation. Read more
Source§

impl AddAssign<&Binary> for u16

Source§

fn add_assign(&mut self, rhs: &Binary)

Performs the += operation. Read more
Source§

impl AddAssign<&Binary> for u32

Source§

fn add_assign(&mut self, rhs: &Binary)

Performs the += operation. Read more
Source§

impl AddAssign<&Binary> for u64

Source§

fn add_assign(&mut self, rhs: &Binary)

Performs the += operation. Read more
Source§

impl AddAssign<&Binary> for u128

Source§

fn add_assign(&mut self, rhs: &Binary)

Performs the += operation. Read more
Source§

impl<const S: usize> AddAssign<&Binary> for Big<S>

Source§

fn add_assign(&mut self, rhs: &Binary)

Performs the += operation. Read more
Source§

impl<const S: usize> AddAssign<Binary> for Big<S>

Source§

fn add_assign(&mut self, rhs: Binary)

Performs the += operation. Read more
Source§

impl Clone for Binary

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Binary

Source§

impl Debug for Binary

Debug forwards to Display, because 0 and 1 read better in test output than the variant names.

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Binary

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for Binary

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<const S: usize> Div<&Binary> for Big<S>

Source§

type Output = Ratio<Sign, Ubig<S>, NonZeroUbig<S>>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Binary) -> Self::Output

Performs the / operation. Read more
Source§

impl<const S: usize> Div<&Binary> for &Big<S>

Source§

type Output = Ratio<Sign, Ubig<S>, NonZeroUbig<S>>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Binary) -> Self::Output

Performs the / operation. Read more
Source§

impl<const S: usize> Div<Binary> for Big<S>

Source§

type Output = Ratio<Sign, Ubig<S>, NonZeroUbig<S>>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Binary) -> Self::Output

Performs the / operation. Read more
Source§

impl<const S: usize> Div<Binary> for &Big<S>

Source§

type Output = Ratio<Sign, Ubig<S>, NonZeroUbig<S>>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Binary) -> Self::Output

Performs the / operation. Read more
Source§

impl<const S: usize> DivAssign<&Binary> for Big<S>

Source§

fn div_assign(&mut self, rhs: &Binary)

Performs the /= operation. Read more
Source§

impl<const S: usize> DivAssign<Binary> for Big<S>

Source§

fn div_assign(&mut self, rhs: Binary)

Performs the /= operation. Read more
Source§

impl Eq for Binary

Source§

impl From<&Binary> for i8

Source§

fn from(other: &Binary) -> Self

Converts to this type from the input type.
Source§

impl From<&Binary> for i16

Source§

fn from(other: &Binary) -> Self

Converts to this type from the input type.
Source§

impl From<&Binary> for i32

Source§

fn from(other: &Binary) -> Self

Converts to this type from the input type.
Source§

impl From<&Binary> for i64

Source§

fn from(other: &Binary) -> Self

Converts to this type from the input type.
Source§

impl From<&Binary> for i128

Source§

fn from(other: &Binary) -> Self

Converts to this type from the input type.
Source§

impl From<&Binary> for u8

Source§

fn from(other: &Binary) -> Self

Converts to this type from the input type.
Source§

impl From<&Binary> for u16

Source§

fn from(other: &Binary) -> Self

Converts to this type from the input type.
Source§

impl From<&Binary> for u32

Source§

fn from(other: &Binary) -> Self

Converts to this type from the input type.
Source§

impl From<&Binary> for u64

Source§

fn from(other: &Binary) -> Self

Converts to this type from the input type.
Source§

impl From<&Binary> for u128

Source§

fn from(other: &Binary) -> Self

Converts to this type from the input type.
Source§

impl<const S: usize> From<&Binary> for Big<S>

Source§

fn from(from: &Binary) -> Self

Converts to this type from the input type.
Source§

impl From<Binary> for i8

Source§

fn from(other: Binary) -> Self

Converts to this type from the input type.
Source§

impl From<Binary> for i16

Source§

fn from(other: Binary) -> Self

Converts to this type from the input type.
Source§

impl From<Binary> for i32

Source§

fn from(other: Binary) -> Self

Converts to this type from the input type.
Source§

impl From<Binary> for i64

Source§

fn from(other: Binary) -> Self

Converts to this type from the input type.
Source§

impl From<Binary> for i128

Source§

fn from(other: Binary) -> Self

Converts to this type from the input type.
Source§

impl From<Binary> for u8

Source§

fn from(other: Binary) -> Self

Converts to this type from the input type.
Source§

impl From<Binary> for u16

Source§

fn from(other: Binary) -> Self

Converts to this type from the input type.
Source§

impl From<Binary> for u32

Source§

fn from(other: Binary) -> Self

Converts to this type from the input type.
Source§

impl From<Binary> for u64

Source§

fn from(other: Binary) -> Self

Converts to this type from the input type.
Source§

impl From<Binary> for u128

Source§

fn from(other: Binary) -> Self

Converts to this type from the input type.
Source§

impl<const S: usize> From<Binary> for Big<S>

Source§

fn from(from: Binary) -> Self

Converts to this type from the input type.
Source§

impl Hash for Binary

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Mul for Binary

Multiplication is closed on {0, 1} and agrees with multiplication of the integers 0 and 1, unlike addition, which is why this impl exists and Add<Binary> for Binary does not.

Source§

type Output = Binary

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Binary> for i8

Source§

type Output = i8

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Binary> for &i8

Source§

type Output = i8

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Binary> for i16

Source§

type Output = i16

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Binary> for &i16

Source§

type Output = i16

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Binary> for i32

Source§

type Output = i32

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Binary> for &i32

Source§

type Output = i32

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Binary> for i64

Source§

type Output = i64

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Binary> for &i64

Source§

type Output = i64

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Binary> for i128

Source§

type Output = i128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Binary> for &i128

Source§

type Output = i128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Binary> for u8

Source§

type Output = u8

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Binary> for &u8

Source§

type Output = u8

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Binary> for u16

Source§

type Output = u16

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Binary> for &u16

Source§

type Output = u16

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Binary> for u32

Source§

type Output = u32

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Binary> for &u32

Source§

type Output = u32

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Binary> for u64

Source§

type Output = u64

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Binary> for &u64

Source§

type Output = u64

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Binary> for u128

Source§

type Output = u128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Binary> for &u128

Source§

type Output = u128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl<const S: usize> Mul<&Binary> for Big<S>

Source§

type Output = Ratio<Sign, Ubig<S>, NonZeroUbig<S>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl<const S: usize> Mul<&Binary> for &Big<S>

Source§

type Output = Ratio<Sign, Ubig<S>, NonZeroUbig<S>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Binary> for i8

Source§

type Output = i8

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Binary> for i16

Source§

type Output = i16

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Binary> for i32

Source§

type Output = i32

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Binary> for i64

Source§

type Output = i64

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Binary> for i128

Source§

type Output = i128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Binary> for u8

Source§

type Output = u8

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Binary> for u16

Source§

type Output = u16

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Binary> for u32

Source§

type Output = u32

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Binary> for u64

Source§

type Output = u64

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Binary> for u128

Source§

type Output = u128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl<const S: usize> Mul<Binary> for Big<S>

Source§

type Output = Ratio<Sign, Ubig<S>, NonZeroUbig<S>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl<const S: usize> Mul<Binary> for &Big<S>

Source§

type Output = Ratio<Sign, Ubig<S>, NonZeroUbig<S>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Binary) -> Self::Output

Performs the * operation. Read more
Source§

impl<const S: usize> MulAssign<&Binary> for Big<S>

Source§

fn mul_assign(&mut self, rhs: &Binary)

Performs the *= operation. Read more
Source§

impl<const S: usize> MulAssign<Binary> for Big<S>

Source§

fn mul_assign(&mut self, rhs: Binary)

Performs the *= operation. Read more
Source§

impl NonZero for Binary

Unlike the other fixed types, this one can be zero, so the answer depends on the value.

Source§

fn is_not_zero(&self) -> bool

Whether the value is not equal to zero. Read more
Source§

impl Ord for Binary

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. Read more
Source§

impl PartialEq for Binary

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialOrd for Binary

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Signed for Binary

This type is zero or positive; it is never negative.

Source§

fn signum(&self) -> Sign

Returns the sign of the number.
Source§

fn is_positive(&self) -> bool

Whether the number is (strictly) greater than zero.
Source§

fn is_negative(&self) -> bool

Whether the number is (strictly) smaller than zero.
Source§

impl StructuralPartialEq for Binary

Source§

impl<const S: usize> Sub<&Binary> for Big<S>

Source§

type Output = Ratio<Sign, Ubig<S>, NonZeroUbig<S>>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Binary) -> Self::Output

Performs the - operation. Read more
Source§

impl<const S: usize> Sub<Binary> for Big<S>

Source§

type Output = Ratio<Sign, Ubig<S>, NonZeroUbig<S>>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Binary) -> Self::Output

Performs the - operation. Read more
Source§

impl<const S: usize> SubAssign<&Binary> for Big<S>

Source§

fn sub_assign(&mut self, rhs: &Binary)

Performs the -= operation. Read more
Source§

impl<const S: usize> SubAssign<Binary> for Big<S>

Source§

fn sub_assign(&mut self, rhs: Binary)

Performs the -= operation. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.