[][src]Struct cyclotomic::fields::sparse::Number

pub struct Number {
    order: i64,
    coeffs: FxHashMap<i64, BigRational>,
}

Represents a polynomial in the orderth root of unity.

Fields

order: i64coeffs: FxHashMap<i64, BigRational>

Implementations

impl Number[src]

pub fn new(order: i64, coeffs: &FxHashMap<i64, BigRational>) -> Number[src]

pub fn increase_order_to(z: &mut Self, new_order: i64)[src]

pub fn match_orders(z1: &mut Number, z2: &mut Number)[src]

Trait Implementations

impl AdditiveGroup for Number[src]

fn add(&mut self, rhs: &mut Self) -> &mut Self[src]

Simplest possible - term wise addition using hashing.

Purposely written so it is obviously symmetric in the parameters, thus commutative by inspection. Of course, there are tests for that.

impl Clone for Number[src]

impl CyclotomicFieldElement for Number[src]

impl Debug for Number[src]

impl FieldElement for Number[src]

impl MultiplicativeGroup for Number[src]

fn mul(&mut self, rhs: &mut Self) -> &mut Self[src]

Multiplies term by term, not bothering to do anything interesting.

fn mul_invert(&mut self) -> &mut Self[src]

Gives the inverse of $z$ using the product of Galois conjugates.

I don't think there's a "trivial" or "stupid" way of doing this. The product of the Galois conjugates is rational, we can normalise to get the multiplicative inverse.

Auto Trait Implementations

impl RefUnwindSafe for Number

impl Send for Number

impl Sync for Number

impl Unpin for Number

impl UnwindSafe for Number

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,