Struct relp::data::number_types::rational::RationalBig[][src]

pub struct RationalBig(pub BigRational);
Expand description

A big rational type that currently completely relies on the methods of num::BigRational.

Implementations

impl Big[src]

#[must_use]
pub fn new(numer: i64, denom: i64) -> Self
[src]

Create a new instance by converting the two provided numbers into arbitrary size ints.

Trait Implementations

impl Add<&'_ Big> for Big[src]

type Output = Self

The resulting type after applying the + operator.

fn add(self, rhs: &Self) -> Self::Output[src]

Performs the + operation. Read more

impl Add<&'_ Big> for &Big[src]

type Output = Big

The resulting type after applying the + operator.

fn add(self, rhs: Self) -> Self::Output[src]

Performs the + operation. Read more

impl Add<&'_ Binary> for RationalBig[src]

type Output = RationalBig

The resulting type after applying the + operator.

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

Performs the + operation. Read more

impl Add<&'_ One> for Big[src]

type Output = Self

The resulting type after applying the + operator.

fn add(self, _: &One) -> Self::Output[src]

Performs the + operation. Read more

impl Add<&'_ Ratio<i128>> for Big[src]

type Output = Self

The resulting type after applying the + operator.

fn add(self, rhs: &Rational128) -> Self::Output[src]

Performs the + operation. Read more

impl Add<&'_ Ratio<i128>> for &Big[src]

type Output = Big

The resulting type after applying the + operator.

fn add(self, rhs: &Rational128) -> Self::Output[src]

Performs the + operation. Read more

impl Add<&'_ Ratio<i32>> for Big[src]

type Output = Self

The resulting type after applying the + operator.

fn add(self, rhs: &Rational32) -> Self::Output[src]

Performs the + operation. Read more

impl Add<&'_ Ratio<i32>> for &Big[src]

type Output = Big

The resulting type after applying the + operator.

fn add(self, rhs: &Rational32) -> Self::Output[src]

Performs the + operation. Read more

impl Add<&'_ Ratio<i64>> for Big[src]

type Output = Self

The resulting type after applying the + operator.

fn add(self, rhs: &Rational64) -> Self::Output[src]

Performs the + operation. Read more

impl Add<&'_ Ratio<i64>> for &Big[src]

type Output = Big

The resulting type after applying the + operator.

fn add(self, rhs: &Rational64) -> Self::Output[src]

Performs the + operation. Read more

impl Add<Big> for Big[src]

type Output = Self

The resulting type after applying the + operator.

fn add(self, rhs: Self) -> Self::Output[src]

Performs the + operation. Read more

impl Add<Big> for &Big[src]

type Output = Big

The resulting type after applying the + operator.

fn add(self, rhs: Big) -> Self::Output[src]

Performs the + operation. Read more

impl Add<Cost> for Big[src]

type Output = Big

The resulting type after applying the + operator.

fn add(self, rhs: Cost) -> Self::Output[src]

Performs the + operation. Read more

impl Add<Option<&'_ Big>> for Big[src]

type Output = Big

The resulting type after applying the + operator.

fn add(self, rhs: Option<&Big>) -> Self::Output[src]

Performs the + operation. Read more

impl Add<Option<&'_ Big>> for &Big[src]

type Output = Big

The resulting type after applying the + operator.

fn add(self, rhs: Option<&Big>) -> Self::Output[src]

Performs the + operation. Read more

impl Add<Option<&'_ Ratio<i128>>> for Big[src]

type Output = Self

The resulting type after applying the + operator.

fn add(self, rhs: Option<&Rational128>) -> Self::Output[src]

Performs the + operation. Read more

impl Add<Option<&'_ Ratio<i128>>> for &Big[src]

type Output = Big

The resulting type after applying the + operator.

fn add(self, rhs: Option<&Rational128>) -> Self::Output[src]

Performs the + operation. Read more

impl Add<Option<&'_ Ratio<i32>>> for Big[src]

type Output = Self

The resulting type after applying the + operator.

fn add(self, rhs: Option<&Rational32>) -> Self::Output[src]

Performs the + operation. Read more

impl Add<Option<&'_ Ratio<i32>>> for &Big[src]

type Output = Big

The resulting type after applying the + operator.

fn add(self, rhs: Option<&Rational32>) -> Self::Output[src]

Performs the + operation. Read more

impl Add<Option<&'_ Ratio<i64>>> for Big[src]

type Output = Self

The resulting type after applying the + operator.

fn add(self, rhs: Option<&Rational64>) -> Self::Output[src]

Performs the + operation. Read more

impl Add<Option<&'_ Ratio<i64>>> for &Big[src]

type Output = Big

The resulting type after applying the + operator.

fn add(self, rhs: Option<&Rational64>) -> Self::Output[src]

Performs the + operation. Read more

impl AddAssign<&'_ Big> for Big[src]

fn add_assign(&mut self, rhs: &Self)[src]

Performs the += operation. Read more

impl AddAssign<&'_ Binary> for RationalBig[src]

fn add_assign(&mut self, rhs: &Binary)[src]

Performs the += operation. Read more

impl AddAssign<&'_ One> for Big[src]

fn add_assign(&mut self, _: &One)[src]

Performs the += operation. Read more

impl AddAssign<&'_ Ratio<i128>> for Big[src]

fn add_assign(&mut self, rhs: &Rational128)[src]

Performs the += operation. Read more

impl AddAssign<&'_ Ratio<i32>> for Big[src]

fn add_assign(&mut self, rhs: &Rational32)[src]

Performs the += operation. Read more

impl AddAssign<&'_ Ratio<i64>> for Big[src]

fn add_assign(&mut self, rhs: &Rational64)[src]

Performs the += operation. Read more

impl AddAssign<Big> for Big[src]

fn add_assign(&mut self, rhs: Self)[src]

Performs the += operation. Read more

impl AddAssign<Ratio<i128>> for Big[src]

fn add_assign(&mut self, rhs: Rational128)[src]

Performs the += operation. Read more

impl AddAssign<Ratio<i32>> for Big[src]

fn add_assign(&mut self, rhs: Rational32)[src]

Performs the += operation. Read more

impl AddAssign<Ratio<i64>> for Big[src]

fn add_assign(&mut self, rhs: Rational64)[src]

Performs the += operation. Read more

impl Clone for Big[src]

fn clone(&self) -> Big[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Big[src]

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

Formats the value using the given formatter. Read more

impl Display for Big[src]

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

Formats the value using the given formatter. Read more

impl Div<&'_ Big> for Big[src]

type Output = Self

The resulting type after applying the / operator.

fn div(self, rhs: &Self) -> Self::Output[src]

Performs the / operation. Read more

impl Div<&'_ Big> for &Big[src]

type Output = Big

The resulting type after applying the / operator.

fn div(self, rhs: Self) -> Self::Output[src]

Performs the / operation. Read more

impl Div<&'_ One> for Big[src]

type Output = Big

The resulting type after applying the / operator.

fn div(self, _: &One) -> Self::Output[src]

Performs the / operation. Read more

impl Div<&'_ Ratio<i128>> for Big[src]

type Output = Big

The resulting type after applying the / operator.

fn div(self, rhs: &Rational128) -> Self::Output[src]

Performs the / operation. Read more

impl Div<&'_ Ratio<i32>> for Big[src]

type Output = Big

The resulting type after applying the / operator.

fn div(self, rhs: &Rational32) -> Self::Output[src]

Performs the / operation. Read more

impl Div<&'_ Ratio<i64>> for Big[src]

type Output = Big

The resulting type after applying the / operator.

fn div(self, rhs: &Rational64) -> Self::Output[src]

Performs the / operation. Read more

impl Div<Big> for Big[src]

type Output = Self

The resulting type after applying the / operator.

fn div(self, rhs: Self) -> Self::Output[src]

Performs the / operation. Read more

impl Div<Big> for &Big[src]

type Output = Big

The resulting type after applying the / operator.

fn div(self, rhs: Big) -> Self::Output[src]

Performs the / operation. Read more

impl DivAssign<&'_ Big> for Big[src]

fn div_assign(&mut self, rhs: &Self)[src]

Performs the /= operation. Read more

impl DivAssign<Big> for Big[src]

fn div_assign(&mut self, rhs: Self)[src]

Performs the /= operation. Read more

impl From<&'_ Big> for Big[src]

fn from(value: &Big) -> Self[src]

Performs the conversion.

impl From<&'_ Binary> for RationalBig[src]

fn from(from: &Binary) -> Self[src]

Performs the conversion.

impl From<&'_ One> for Big[src]

fn from(_: &One) -> Self[src]

Performs the conversion.

impl From<&'_ Ratio<i128>> for Big[src]

fn from(value: &Rational128) -> Self[src]

Performs the conversion.

impl From<&'_ Ratio<i32>> for Big[src]

fn from(value: &Rational32) -> Self[src]

Performs the conversion.

impl From<&'_ Ratio<i64>> for Big[src]

fn from(value: &Rational64) -> Self[src]

Performs the conversion.

impl From<&'_ str> for Big[src]

fn from(input: &str) -> Self[src]

Performs the conversion.

impl From<Binary> for RationalBig[src]

fn from(from: Binary) -> Self[src]

Performs the conversion.

impl From<One> for Big[src]

fn from(_: One) -> Self[src]

Performs the conversion.

impl From<Ratio<i128>> for Big[src]

fn from(value: Rational128) -> Self[src]

Performs the conversion.

impl From<Ratio<i32>> for Big[src]

fn from(value: Rational32) -> Self[src]

Performs the conversion.

impl From<Ratio<i64>> for Big[src]

fn from(value: Rational64) -> Self[src]

Performs the conversion.

impl FromPrimitive for Big[src]

fn from_i64(n: i64) -> Option<Self>[src]

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_u64(n: u64) -> Option<Self>[src]

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_f32(n: f32) -> Option<Self>[src]

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_f64(n: f64) -> Option<Self>[src]

Converts a f64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_isize(n: isize) -> Option<Self>[src]

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_i8(n: i8) -> Option<Self>[src]

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_i16(n: i16) -> Option<Self>[src]

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_i32(n: i32) -> Option<Self>[src]

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_i128(n: i128) -> Option<Self>[src]

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_usize(n: usize) -> Option<Self>[src]

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_u8(n: u8) -> Option<Self>[src]

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_u16(n: u16) -> Option<Self>[src]

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_u32(n: u32) -> Option<Self>[src]

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_u128(n: u128) -> Option<Self>[src]

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

impl Mul<&'_ Big> for Big[src]

type Output = Self

The resulting type after applying the * operator.

fn mul(self, rhs: &Self) -> Self::Output[src]

Performs the * operation. Read more

impl Mul<&'_ Big> for &Big[src]

type Output = Big

The resulting type after applying the * operator.

fn mul(self, rhs: Self) -> Self::Output[src]

Performs the * operation. Read more

impl Mul<&'_ Binary> for RationalBig[src]

type Output = RationalBig

The resulting type after applying the * operator.

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

Performs the * operation. Read more

impl Mul<&'_ Binary> for &RationalBig[src]

type Output = RationalBig

The resulting type after applying the * operator.

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

Performs the * operation. Read more

impl Mul<&'_ One> for &Big[src]

type Output = Big

The resulting type after applying the * operator.

fn mul(self, _: &One) -> Self::Output[src]

Performs the * operation. Read more

impl Mul<&'_ Ratio<i128>> for Big[src]

type Output = Big

The resulting type after applying the * operator.

fn mul(self, rhs: &Rational128) -> Self::Output[src]

Performs the * operation. Read more

impl Mul<&'_ Ratio<i128>> for &Big[src]

type Output = Big

The resulting type after applying the * operator.

fn mul(self, rhs: &Rational128) -> Self::Output[src]

Performs the * operation. Read more

impl Mul<&'_ Ratio<i32>> for Big[src]

type Output = Big

The resulting type after applying the * operator.

fn mul(self, rhs: &Rational32) -> Self::Output[src]

Performs the * operation. Read more

impl Mul<&'_ Ratio<i32>> for &Big[src]

type Output = Big

The resulting type after applying the * operator.

fn mul(self, rhs: &Rational32) -> Self::Output[src]

Performs the * operation. Read more

impl Mul<&'_ Ratio<i64>> for Big[src]

type Output = Big

The resulting type after applying the * operator.

fn mul(self, rhs: &Rational64) -> Self::Output[src]

Performs the * operation. Read more

impl Mul<&'_ Ratio<i64>> for &Big[src]

type Output = Big

The resulting type after applying the * operator.

fn mul(self, rhs: &Rational64) -> Self::Output[src]

Performs the * operation. Read more

impl Mul<Big> for Big[src]

type Output = Self

The resulting type after applying the * operator.

fn mul(self, rhs: Self) -> Self::Output[src]

Performs the * operation. Read more

impl Mul<Big> for &Big[src]

type Output = Big

The resulting type after applying the * operator.

fn mul(self, rhs: Big) -> Self::Output[src]

Performs the * operation. Read more

impl Mul<Cost> for Big[src]

type Output = Big

The resulting type after applying the * operator.

fn mul(self, rhs: Cost) -> Self::Output[src]

Performs the * operation. Read more

impl Mul<Cost> for &Big[src]

type Output = Big

The resulting type after applying the * operator.

fn mul(self, rhs: Cost) -> Self::Output[src]

Performs the * operation. Read more

impl Mul<Option<&'_ Big>> for Big[src]

type Output = Big

The resulting type after applying the * operator.

fn mul(self, rhs: Option<&Big>) -> Self::Output[src]

Performs the * operation. Read more

impl Mul<Option<&'_ Big>> for &Big[src]

type Output = Big

The resulting type after applying the * operator.

fn mul(self, rhs: Option<&Big>) -> Self::Output[src]

Performs the * operation. Read more

impl Mul<Option<&'_ Ratio<i128>>> for Big[src]

type Output = Big

The resulting type after applying the * operator.

fn mul(self, rhs: Option<&Rational128>) -> Self::Output[src]

Performs the * operation. Read more

impl Mul<Option<&'_ Ratio<i128>>> for &Big[src]

type Output = Big

The resulting type after applying the * operator.

fn mul(self, rhs: Option<&Rational128>) -> Self::Output[src]

Performs the * operation. Read more

impl Mul<Option<&'_ Ratio<i32>>> for Big[src]

type Output = Big

The resulting type after applying the * operator.

fn mul(self, rhs: Option<&Rational32>) -> Self::Output[src]

Performs the * operation. Read more

impl Mul<Option<&'_ Ratio<i32>>> for &Big[src]

type Output = Big

The resulting type after applying the * operator.

fn mul(self, rhs: Option<&Rational32>) -> Self::Output[src]

Performs the * operation. Read more

impl Mul<Option<&'_ Ratio<i64>>> for Big[src]

type Output = Big

The resulting type after applying the * operator.

fn mul(self, rhs: Option<&Rational64>) -> Self::Output[src]

Performs the * operation. Read more

impl Mul<Option<&'_ Ratio<i64>>> for &Big[src]

type Output = Big

The resulting type after applying the * operator.

fn mul(self, rhs: Option<&Rational64>) -> Self::Output[src]

Performs the * operation. Read more

impl MulAssign<&'_ Big> for Big[src]

fn mul_assign(&mut self, rhs: &Self)[src]

Performs the *= operation. Read more

impl MulAssign<Big> for Big[src]

fn mul_assign(&mut self, rhs: Self)[src]

Performs the *= operation. Read more

impl Neg for Big[src]

type Output = Self

The resulting type after applying the - operator.

fn neg(self) -> Self::Output[src]

Performs the unary - operation. Read more

impl Neg for &Big[src]

type Output = Big

The resulting type after applying the - operator.

fn neg(self) -> Self::Output[src]

Performs the unary - operation. Read more

impl One for Big[src]

fn one() -> Self[src]

Returns the multiplicative identity element of Self, 1. Read more

fn set_one(&mut self)[src]

Sets self to the multiplicative identity element of Self, 1.

fn is_one(&self) -> bool where
    Self: PartialEq
[src]

Returns true if self is equal to the multiplicative identity. Read more

impl Ord for Big[src]

fn cmp(&self, other: &Big) -> Ordering[src]

This method returns an Ordering between self and other. Read more

#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]

Compares and returns the maximum of two values. Read more

#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]

Compares and returns the minimum of two values. Read more

#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]

Restrict a value to a certain interval. Read more

impl PartialEq<Big> for Big[src]

fn eq(&self, other: &Big) -> bool[src]

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

fn ne(&self, other: &Big) -> bool[src]

This method tests for !=.

impl PartialEq<Ratio<i128>> for Big[src]

fn eq(&self, other: &Rational128) -> bool[src]

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<Ratio<i32>> for Big[src]

fn eq(&self, other: &Rational32) -> bool[src]

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<Ratio<i64>> for Big[src]

fn eq(&self, other: &Rational64) -> bool[src]

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialOrd<Big> for Big[src]

fn partial_cmp(&self, other: &Big) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Sub<&'_ Big> for Big[src]

type Output = Self

The resulting type after applying the - operator.

fn sub(self, rhs: &Self) -> Self::Output[src]

Performs the - operation. Read more

impl Sub<&'_ Big> for &Big[src]

type Output = Big

The resulting type after applying the - operator.

fn sub(self, rhs: Self) -> Self::Output[src]

Performs the - operation. Read more

impl Sub<Big> for Big[src]

type Output = Self

The resulting type after applying the - operator.

fn sub(self, rhs: Self) -> Self::Output[src]

Performs the - operation. Read more

impl Sub<Big> for &Big[src]

type Output = Big

The resulting type after applying the - operator.

fn sub(self, rhs: Big) -> Self::Output[src]

Performs the - operation. Read more

impl SubAssign<&'_ Big> for Big[src]

fn sub_assign(&mut self, rhs: &Self)[src]

Performs the -= operation. Read more

impl SubAssign<Big> for Big[src]

fn sub_assign(&mut self, rhs: Self)[src]

Performs the -= operation. Read more

impl Sum<Big> for Big[src]

fn sum<I: Iterator<Item = Self>>(iter: I) -> Self[src]

Method which takes an iterator and generates Self from the elements by “summing up” the items. Read more

impl Zero for Big[src]

fn zero() -> Self[src]

Returns the additive identity element of Self, 0. Read more

fn set_zero(&mut self)[src]

Sets self to the additive identity element of Self, 0.

fn is_zero(&self) -> bool[src]

Returns true if self is equal to the additive identity.

impl Eq for Big[src]

impl StructuralEq for Big[src]

impl StructuralPartialEq for Big[src]

Auto Trait Implementations

impl RefUnwindSafe for Big

impl Send for Big

impl Sync for Big

impl Unpin for Big

impl UnwindSafe for Big

Blanket Implementations

impl<T> Abs for T where
    T: Neg<Output = T> + Ord + Zero
[src]

fn abs(self) -> Self[src]

The absolute value of a number. Read more

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

pub fn equivalent(&self, key: &K) -> bool[src]

Compare self to key and return true if they are equal.

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> NotZero for T where
    T: Zero
[src]

pub fn is_not_zero(&Self) -> bool[src]

Whether the value is not equal to zero.

impl<T> NotZeroSigned for T where
    T: Zero + NotZero + Neg<Output = T> + PartialOrd<T> + Clone
[src]

pub default fn signum(&Self) -> Sign[src]

Whether the value is positive or negative.

fn abs(&self) -> Self[src]

Absolute value of x, |x|.

fn is_positive(&self) -> bool[src]

Whether x > 0.

fn is_negative(&self) -> bool[src]

Whether x < 0.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.