Skip to main content

Germ

Struct Germ 

Source
pub struct Germ { /* private fields */ }
Expand description

A germ at dt = 0. See the module documentation.

Implementations§

Source§

impl Germ

Source

pub fn is_transmissible(&self) -> bool

Whether the germ can travel as data: one holding a real built from a function a program defines cannot, that function staying with the program.

Source

pub fn from_hyperreal(h: &Hyperreal) -> Germ

The series of a hyperreal.

Source

pub fn from_puiseux(p: &Puiseux) -> Germ

The expansion of a value of the real closure, on its branch’s grid.

Source

pub fn from_i64(n: i64) -> Germ

Source

pub fn constant(x: &ExactReal) -> Germ

A computable real, constant in dt.

Source

pub fn as_hyperreal(&self) -> Option<&Hyperreal>

The rational function this germ is the series of, when it was built as one.

Source

pub fn flow(flow: &Arc<Flow>, i: usize) -> Germ

Component i of a flow’s state.

Source

pub fn standard(x: &ExactReal) -> Germ

A limited value known by its standard part alone; every higher order is GermError::StandardOnly.

Source

pub fn unlimited(sign: i32) -> Germ

A value beyond every bound with the sign of sign.

Source

pub fn ramification(&self) -> u32

The ramification q: order k is the coefficient of dt^(k/q).

Source

pub fn unlimited_sign(&self) -> Option<i32>

The sign of an unlimited germ; None for a limited one and for one whose order is not known.

Source

pub fn floor(&self) -> i64

The lowest order whose coefficient may be nonzero, in units of dt^(1/q).

Source

pub fn coefficient(&self, k: i64) -> Result<ExactReal, GermError>

The coefficient of dt^(k/q), q the Germ::ramification.

Source

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

Source

pub fn neg(&self) -> Germ

Source

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

Source

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

Source

pub fn leading(&self) -> Result<(i64, ExactReal), GermError>

The order, in units of dt^(1/q), and the coefficient of the first nonzero term.

Source

pub fn recip(&self) -> Result<Germ, GermError>

Source

pub fn root(&self, n: u32) -> Result<Germ, GermError>

The real n-th root (n ≥ 1), the nonnegative one for an even n; refused for a negative germ and an even n.

Source

pub fn exp(&self) -> Result<Germ, GermError>

exp(self), refused for an infinite value, whose exponential lies beyond every power of dt.

Source

pub fn ln(&self) -> Result<Germ, GermError>

The natural logarithm of a value whose standard part is positive; one that is negative has none, and one that is a positive infinitesimal or infinite carries the logarithm of dt.

Source

pub fn div(&self, o: &Germ) -> Result<Germ, GermError>

Source

pub fn signum(&self) -> Result<i32, GermError>

−1, 0 (only for a germ that is exactly a zero rational function) or 1.

Source

pub fn standard_part(&self) -> Result<Option<ExactReal>, GermError>

The standard part of a limited germ; None for an infinite one.

Source

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

The two leading orders and, from the order after the last one shown on the germ’s grid, what is left, the infinitesimal written name: e - (1/2)·e·dt + O(dt^2), 1 + √dt + O(dt).

Trait Implementations§

Source§

impl Clone for Germ

Source§

fn clone(&self) -> Germ

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 Germ

Source§

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

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

impl ExactCodec for Germ

Source§

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

A node tag, then the node: 0 the series of a hyperreal; 1 a sum and 2 a product of two germs; 3 a negation; 4 a reciprocal, whose leading term is found again on reading; 5 a component of a flow — its width n, the number of update terms and each as n × n rationals, T, δ, the n start germs and the component; 6 a computable real constant in dt; 7 a value known by its standard part; 8 an unlimited value by its sign; 10 a value of the real closure; 11 an exponential, 12 a logarithm and 13 an n-th root, n after the germ; 14 a component of a flow whose update is a polynomial in a root of dt, its grid and then the fields of 5. A germ refined to a finer grid is written as itself: every node that meets two grids meets them again as it is read.

Source§

fn read(buf: &[u8], pos: &mut usize) -> Option<Self>

Source§

fn to_bytes(&self) -> Vec<u8> ⓘ

Source§

fn from_bytes(buf: &[u8]) -> Option<Self>

The value buf canonically encodes, with nothing left over.

Auto Trait Implementations§

§

impl Freeze for Germ

§

impl !RefUnwindSafe for Germ

§

impl Send for Germ

§

impl Sync for Germ

§

impl Unpin for Germ

§

impl UnsafeUnpin for Germ

§

impl !UnwindSafe for Germ

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.