Skip to main content

Finite

Trait Finite 

Source
pub trait Finite: Clone {
    // Required methods
    fn basis(&self) -> &Basis;
    fn add(&self, o: &Self) -> Self;
    fn sub(&self, o: &Self) -> Self;
    fn mul(&self, o: &Self) -> Self;
    fn try_reconstruct(&self) -> Option<(BigInt, BigInt)>;
    fn reimage(p: &BigInt, q: &BigInt, basis: &Basis) -> Self;
}
Expand description

The finite (∏ ℚ_p) component of an adelic value: RNS arithmetic plus a reconstruction routine that may detect range overflow.

Required Methods§

Source

fn basis(&self) -> &Basis

Source

fn add(&self, o: &Self) -> Self

Source

fn sub(&self, o: &Self) -> Self

Source

fn mul(&self, o: &Self) -> Self

Source

fn try_reconstruct(&self) -> Option<(BigInt, BigInt)>

Reconstruct the exact (p, q) (with q == 1 for integers), or None when the value cannot be recovered within the current basis range.

Source

fn reimage(p: &BigInt, q: &BigInt, basis: &Basis) -> Self

Re-encode a known exact p/q over a (possibly larger) basis.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§