Skip to main content

Closed

Enum Closed 

Source
pub enum Closed {
    Field(Hyperreal),
    Series(Puiseux),
}
Expand description

A value of the real closure in its one form: a hyperreal when it is a rational function of dt, otherwise a Puiseux series that is no such function.

Variants§

§

Field(Hyperreal)

§

Series(Puiseux)

Implementations§

Source§

impl Closed

Source

pub fn from_hyperreal(h: Hyperreal) -> Closed

A hyperreal of the rational functions of dt.

Source

pub fn as_standard(&self) -> Option<Algebraic>

The standard number the value is, when it has no infinitesimal part.

Source

pub fn leading(&self) -> Option<(Rational, Algebraic)>

The exponent of the leading term in dt and its coefficient; None for zero.

Source

pub fn is_zero(&self) -> bool

Source

pub fn add(&self, o: &Closed) -> Closed

Source

pub fn neg(&self) -> Closed

Source

pub fn sub(&self, o: &Closed) -> Closed

Source

pub fn mul(&self, o: &Closed) -> Closed

Source

pub fn recip(&self) -> Option<Closed>

The reciprocal; None for zero. The reciprocal of a value that is no rational function of a root of dt is none either.

Source

pub fn div(&self, o: &Closed) -> Option<Closed>

Source

pub fn pow(&self, k: i32) -> Result<Closed, PowerRefusal>

self^k; refused for zero to a negative power and, on a rational function of a root of dt, for a power past crate::hyperreal::MAX_POWER_DEGREE in that root.

Source

pub fn root(&self, n: u32) -> Result<Closed, String>

The real n-th root — the positive one for even n — or the reason there is none.

Source

pub fn signum(&self) -> i32

−1, 0 or 1: the sign of the leading coefficient.

Source

pub fn compare(&self, o: &Closed) -> Ordering

The order. The terms both expansions hold through the orders that separate their own polynomials’ roots decide it at the first place they differ; expansions that agree that far are ordered by the sign of the difference, which is the zero root of its polynomial exactly when the two are equal.

Source

pub fn valuation(&self) -> Option<Rational>

The exponent of the leading term in dt; None for zero.

Source

pub fn is_infinitesimal(&self) -> bool

Source

pub fn is_limited(&self) -> bool

Source

pub fn standard_part(&self) -> Option<Algebraic>

The standard real infinitely close to a limited value; None for an infinite one.

Source

pub fn render(&self, name: &str) -> String

The value with the infinitesimal written name.

Source§

impl Closed

Source

pub fn encode(&self, out: &mut Vec<u8>)

The bytes of the value’s one form.

Source

pub fn decode(buf: &[u8], pos: &mut usize) -> Option<Closed>

Trait Implementations§

Source§

impl Clone for Closed

Source§

fn clone(&self) -> Closed

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Closed

Source§

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

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

impl Hash for Closed

Source§

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

Equal values have one form, and two equal series one expansion: the field value itself, or a series by its leading term.

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 PartialEq for Closed

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Closed

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

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

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.