Skip to main content

Expansion

Struct Expansion 

Source
pub struct Expansion<C: Coefficient> { /* private fields */ }
Expand description

An expansion in the smallest infinitesimal of a value. See the module documentation.

Implementations§

Source§

impl<C: Coefficient> Expansion<C>

Source

pub fn fraction( num: Vec<C>, den: Vec<C>, q: u32, ) -> Result<Expansion<C>, ExpansionError>

The expansion of num/den, polynomials in s^(1/q) with den nonzero.

Source

pub fn constant(c: C) -> Expansion<C>

A value constant in s: the coefficient itself at order 0.

Source

pub fn source(source: Arc<dyn Source<C>>, floor: i64, q: u32) -> Expansion<C>

The expansion a Source gives, lowest order floor, on the grid q.

Source

pub fn ramification(&self) -> u32

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

Source

pub fn floor(&self) -> i64

The lowest order that may be nonzero.

Source

pub fn refined(&self, m: u32) -> Expansion<C>

The same expansion on a grid m times finer.

Source

pub fn coefficient(&self, k: i64) -> Result<C, ExpansionError>

The coefficient of s^(k/q).

Source

pub fn add(&self, o: &Expansion<C>) -> Expansion<C>

Source

pub fn neg(&self) -> Expansion<C>

Source

pub fn sub(&self, o: &Expansion<C>) -> Expansion<C>

The difference coefficient by coefficient, so a term both sides share cancels in the coefficient’s own arithmetic.

Source

pub fn mul(&self, o: &Expansion<C>) -> Expansion<C>

Source

pub fn leading_through( &self, through: i64, ) -> Result<Option<(i64, C)>, ExpansionError>

The first nonzero term at or below the order through: its order and coefficient; None when every coefficient through it is zero.

Source

pub fn recip(&self, order: i64, lead: C) -> Expansion<C>

1/self for a value whose leading term is lead·s^(order/q).

Source

pub fn exp(&self) -> Expansion<C>

exp(self) for a value with no negative order.

Source

pub fn ln(&self, g0: C) -> Expansion<C>

ln(self) for a value with no infinitesimal order whose coefficient of order 0 is g0.

Source

pub fn root(&self, n: u32, v: i64, c: C) -> Result<Expansion<C>, ExpansionError>

The real n-th root (n ≥ 2) of a value whose leading term is c·s^(v/q), the nonnegative one for an even n; refused for a negative value and an even n. The grid is refined until n divides the leading order.

Trait Implementations§

Source§

impl<C: Clone + Coefficient> Clone for Expansion<C>

Source§

fn clone(&self) -> Expansion<C>

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<C: Debug + Coefficient> Debug for Expansion<C>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<C> Freeze for Expansion<C>

§

impl<C> !RefUnwindSafe for Expansion<C>

§

impl<C> Send for Expansion<C>

§

impl<C> Sync for Expansion<C>

§

impl<C> Unpin for Expansion<C>

§

impl<C> UnsafeUnpin for Expansion<C>

§

impl<C> !UnwindSafe for Expansion<C>

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.