Trait snarkvm_gadgets::integers::uint::uint_impl::UInt [−][src]
pub trait UInt: Integer { fn negate(&self) -> Self; fn rotr(&self, by: usize) -> Self; fn addmany<F: PrimeField, CS: ConstraintSystem<F>>(
cs: CS,
operands: &[Self]
) -> Result<Self, SynthesisError>; fn mul<F: PrimeField, CS: ConstraintSystem<F>>(
&self,
cs: CS,
other: &Self
) -> Result<Self, UnsignedIntegerError>; }
Required methods
fn addmany<F: PrimeField, CS: ConstraintSystem<F>>(
cs: CS,
operands: &[Self]
) -> Result<Self, SynthesisError>
fn addmany<F: PrimeField, CS: ConstraintSystem<F>>(
cs: CS,
operands: &[Self]
) -> Result<Self, SynthesisError>
Perform modular addition of several UInt
objects.
fn mul<F: PrimeField, CS: ConstraintSystem<F>>(
&self,
cs: CS,
other: &Self
) -> Result<Self, UnsignedIntegerError>
fn mul<F: PrimeField, CS: ConstraintSystem<F>>(
&self,
cs: CS,
other: &Self
) -> Result<Self, UnsignedIntegerError>
Perform Bitwise multiplication of two UInt
objects.
Reference: https://en.wikipedia.org/wiki/Binary_multiplier