pub trait Digits<T>: Sized {
    fn to_digits_asc(&self, base: &T) -> Vec<T>;
    fn to_digits_desc(&self, base: &T) -> Vec<T>;
    fn from_digits_asc<I: Iterator<Item = T>>(
        base: &T,
        digits: I
    ) -> Option<Self>; fn from_digits_desc<I: Iterator<Item = T>>(
        base: &T,
        digits: I
    ) -> Option<Self>; }
Expand description

Expresses a value as a Vec of digits, or reads a value from an iterator of digits.

The trait is parameterized by T, which is both the digit type and the base type.

Required Methods

Returns a Vec containing the digits of a value in ascending order: least- to most-significant.

Returns a Vec containing the digits of a value in descending order: most- to least-significant.

Converts an iterator of digits into a value.

The input digits are in ascending order: least- to most-significant.

Converts an iterator of digits into a value.

The input digits are in descending order: most- to least-significant.

Implementations on Foreign Types

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Returns a Vec containing the digits of a number in ascending order (least- to most-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it ends with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_i = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than Self::MAX.

Examples

See here.

Returns a Vec containing the digits of a number in descending order (most- to least-significant).

The base must be convertible to Self. If self is 0, the Vec is empty; otherwise, it begins with a nonzero digit.

$f(x, b) = (d_i)_ {i=0}^{k-1}$, where $0 \leq d_i < b$ for all $i$, $k=0$ or $d_{k-1} \neq 0$, and

$$ \sum_{i=0}^{k-1}b^i d_{k-i-1} = x. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is self.significant_bits().

Panics

Panics if base is less than 2 or greater than $t::MAX.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in ascending order (least- to most-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^id_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Converts an iterator of digits into a value.

The input digits are in descending order (most- to least-significant). The base must be no larger than Self::MAX. The function returns None if the input represents a number that can’t fit in Self, if base is greater than Self::MAX, or if any of the digits are greater than or equal to the base.

$$ f((d_i)_ {i=0}^{k-1}, b) = \sum_{i=0}^{k-1}b^{k-i-1}d_i. $$

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is digits.count().

Panics

Panics if base is less than 2.

Examples

See here.

Implementors