Struct mexprp::num::ComplexRugRat
[−]
[src]
pub struct ComplexRugRat { pub r: Rational, pub i: Rational, }
A complex number made of a real part and an imaginary part, both of which are rug::Rationals
.
Requires the rug
feature.
Fields
r: Rational
The real part
i: Rational
The imaginary part
Methods
impl ComplexRugRat
[src]
Trait Implementations
impl Debug for ComplexRugRat
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for ComplexRugRat
[src]
fn clone(&self) -> ComplexRugRat
[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 Num for ComplexRugRat
[src]
fn from_f64(t: f64, ctx: &Context<Self>) -> Calculation<Self>
[src]
Attempts to create an instance of the number from an f64
fn from_f64_complex(
(r, i): (f64, f64),
ctx: &Context<Self>
) -> Calculation<Self>
[src]
(r, i): (f64, f64),
ctx: &Context<Self>
) -> Calculation<Self>
Attempts to create an instance of the number from complex parts. It's possible the imaginary part will be ignored for Numbers that don't support it. Read more
fn typename() -> String
[src]
Returns the name of this Num type (used for errors)
fn tryord(
&self,
other: &Self,
ctx: &Context<Self>
) -> Result<Ordering, MathError>
[src]
&self,
other: &Self,
ctx: &Context<Self>
) -> Result<Ordering, MathError>
fn add(&self, other: &Self, ctx: &Context<Self>) -> Calculation<Self>
[src]
fn sub(&self, other: &Self, ctx: &Context<Self>) -> Calculation<Self>
[src]
fn mul(&self, other: &Self, ctx: &Context<Self>) -> Calculation<Self>
[src]
fn div(&self, other: &Self, ctx: &Context<Self>) -> Calculation<Self>
[src]
fn pow(&self, other: &Self, ctx: &Context<Self>) -> Calculation<Self>
[src]
fn sqrt(&self, ctx: &Context<Self>) -> Calculation<Self>
[src]
fn nrt(&self, other: &Self, ctx: &Context<Self>) -> Calculation<Self>
[src]
fn abs(&self, ctx: &Context<Self>) -> Calculation<Self>
[src]
fn sin(&self, ctx: &Context<Self>) -> Calculation<Self>
[src]
fn cos(&self, ctx: &Context<Self>) -> Calculation<Self>
[src]
fn tan(&self, ctx: &Context<Self>) -> Calculation<Self>
[src]
fn asin(&self, ctx: &Context<Self>) -> Calculation<Self>
[src]
fn acos(&self, ctx: &Context<Self>) -> Calculation<Self>
[src]
fn atan(&self, ctx: &Context<Self>) -> Calculation<Self>
[src]
fn atan2(&self, other: &Self, ctx: &Context<Self>) -> Calculation<Self>
[src]
fn floor(&self, ctx: &Context<Self>) -> Calculation<Self>
[src]
fn ceil(&self, ctx: &Context<Self>) -> Calculation<Self>
[src]
fn round(&self, ctx: &Context<Self>) -> Calculation<Self>
[src]
fn log(&self, other: &Self, ctx: &Context<Self>) -> Calculation<Self>
[src]
impl PartialOrd for ComplexRugRat
[src]
fn partial_cmp(&self, other: &ComplexRugRat) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
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
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
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
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 PartialEq for ComplexRugRat
[src]
fn eq(&self, other: &ComplexRugRat) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.