Trait fpe::ff1::NumeralString[][src]

pub trait NumeralString: Sized {
    type Num: Numeral;
    fn is_valid(&self, radix: u32) -> bool;
fn len(&self) -> usize;
fn split(&self, u: usize) -> (Self, Self);
fn concat(a: Self, b: Self) -> Self;
fn num_radix(&self, radix: u32) -> Self::Num;
fn str_radix(x: Self::Num, radix: u32, m: usize) -> Self; }
Expand description

For a given base, a finite, ordered sequence of numerals for the base.

Associated Types

The type used for numeric operations.

Required methods

Returns whether this numeral string is valid for the base radix.

Returns the number of numerals in this numeral string.

Splits this numeral string into two sections X[..u] and X[u..].

Concatenates two numeral strings.

The number that this numeral string represents in the base radix when the numerals are valued in decreasing order of significance (big-endian order).

Given a non-negative integer x less than radixm, returns the representation of x as a string of m numerals in base radix, in decreasing order of significance (big-endian order).

Implementors