Trait ZZ

Source
pub trait ZZ: Clone {
    type Element: ZZElem;

    // Required methods
    fn from_u64(&self, a: u64) -> Self::Element;
    fn from_i64(&self, a: i64) -> Self::Element;
    fn modulo(&self) -> u32;

    // Provided methods
    fn zero(&self) -> Self::Element { ... }
    fn one(&self) -> Self::Element { ... }
}
Expand description

$\mathbb{Z} / m \mathbb{Z}$の環

Required Associated Types§

Source

type Element: ZZElem

環の元の型

Required Methods§

Source

fn from_u64(&self, a: u64) -> Self::Element

u64から生成する。

Source

fn from_i64(&self, a: i64) -> Self::Element

i64から生成する。

Source

fn modulo(&self) -> u32

剰余の除数を返す。

Provided Methods§

Source

fn zero(&self) -> Self::Element

加法の単位元を返す。

Source

fn one(&self) -> Self::Element

乗法の単位元を返す。

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§