Skip to main content

AdditiveGroup

Trait AdditiveGroup 

Source
pub trait AdditiveGroup:
    Sized
    + Eq
    + 'static
    + CanonicalSerialize
    + CanonicalDeserialize
    + Copy
    + Clone
    + Default
    + Send
    + Sync
    + Hash
    + Debug
    + Display
    + UniformRand
    + Zeroize
    + Zero<Output = Self, Output = Self, Output = Self>
    + Neg<Output = Self>
    + Add
    + Sub<Output = Self, Output = Self, Output = Self>
    + Mul<Self::Scalar, Output = Self, Output = Self, Output = Self>
    + AddAssign
    + SubAssign
    + MulAssign<Self::Scalar>
    + for<'a> Add<&'a Self>
    + for<'a> Sub<&'a Self>
    + for<'a> Mul<&'a Self::Scalar>
    + for<'a> AddAssign<&'a Self>
    + for<'a> SubAssign<&'a Self>
    + for<'a> MulAssign<&'a Self::Scalar>
    + for<'a> Add<&'a mut Self>
    + for<'a> Sub<&'a mut Self>
    + for<'a> Mul<&'a mut Self::Scalar>
    + for<'a> AddAssign<&'a mut Self>
    + for<'a> SubAssign<&'a mut Self>
    + for<'a> MulAssign<&'a mut Self::Scalar>
    + Sum
    + for<'a> Sum<&'a Self> {
    type Scalar: Field;

    const ZERO: Self;

    // Provided methods
    fn double(&self) -> Self { ... }
    fn double_in_place(&mut self) -> &mut Self { ... }
    fn neg_in_place(&mut self) -> &mut Self { ... }
}

Required Associated Constants§

Source

const ZERO: Self

The additive identity of the field.

Required Associated Types§

Provided Methods§

Source

fn double(&self) -> Self

Doubles self.

Source

fn double_in_place(&mut self) -> &mut Self

Doubles self in place.

Source

fn neg_in_place(&mut self) -> &mut Self

Negates self in place.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<P, const N: usize> AdditiveGroup for Fp<P, N>
where P: FpConfig<N>,

Source§

const ZERO: Fp<P, N> = P::ZERO

Source§

type Scalar = Fp<P, N>

Source§

impl<P: DOCurveConfig> AdditiveGroup for ark_ec::models::double_odd::Projective<P>

Source§

impl<P: Pairing> AdditiveGroup for PairingOutput<P>

Source§

impl<P: SWCurveConfig> AdditiveGroup for ark_ec::models::short_weierstrass::Projective<P>

Source§

impl<P: TECurveConfig> AdditiveGroup for ark_ec::models::twisted_edwards::Projective<P>

Source§

impl<P> AdditiveGroup for CubicExtField<P>
where P: CubicExtConfig,

Source§

impl<P> AdditiveGroup for QuadExtField<P>
where P: QuadExtConfig,

Source§

impl<P> AdditiveGroup for SmallFp<P>
where P: SmallFpConfig,

Source§

const ZERO: SmallFp<P> = P::ZERO

Source§

type Scalar = SmallFp<P>