Struct snarkvm_utilities::biginteger::BigInteger384
source · pub struct BigInteger384(pub [u64; 6]);Tuple Fields§
§0: [u64; 6]Implementations§
Trait Implementations§
source§impl AsMut<[u64]> for BigInteger384
impl AsMut<[u64]> for BigInteger384
source§impl AsRef<[u64]> for BigInteger384
impl AsRef<[u64]> for BigInteger384
source§impl BigInteger for BigInteger384
impl BigInteger for BigInteger384
source§fn add_nocarry(&mut self, other: &Self) -> bool
fn add_nocarry(&mut self, other: &Self) -> bool
Add another representation to this one, returning the carry bit.
source§fn sub_noborrow(&mut self, other: &Self) -> bool
fn sub_noborrow(&mut self, other: &Self) -> bool
Subtract another representation from this one, returning the borrow bit.
source§fn mul2(&mut self)
fn mul2(&mut self)
Performs a leftwise bitshift of this number, effectively multiplying
it by 2. Overflow is ignored.
source§fn div2(&mut self)
fn div2(&mut self)
Performs a rightwise bitshift of this number, effectively dividing
it by 2.
source§fn num_bits(&self) -> u32
fn num_bits(&self) -> u32
Compute the number of bits needed to encode this number. Always a
multiple of 64.
source§fn to_biguint(&self) -> BigUint
fn to_biguint(&self) -> BigUint
Returns the BigUint representation.
source§impl Clone for BigInteger384
impl Clone for BigInteger384
source§fn clone(&self) -> BigInteger384
fn clone(&self) -> BigInteger384
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for BigInteger384
impl Debug for BigInteger384
source§impl Default for BigInteger384
impl Default for BigInteger384
source§fn default() -> BigInteger384
fn default() -> BigInteger384
Returns the “default value” for a type. Read more
source§impl Display for BigInteger384
impl Display for BigInteger384
source§impl Distribution<BigInteger384> for Standard
impl Distribution<BigInteger384> for Standard
source§fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> BigInteger384
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> BigInteger384
Generate a random value of
T, using rng as the source of randomness.source§impl From<u64> for BigInteger384
impl From<u64> for BigInteger384
source§fn from(val: u64) -> BigInteger384
fn from(val: u64) -> BigInteger384
Converts to this type from the input type.
source§impl FromBits for BigInteger384
impl FromBits for BigInteger384
source§fn from_bits_le(bits: &[bool]) -> Result<Self>
fn from_bits_le(bits: &[bool]) -> Result<Self>
Returns a BigInteger by parsing a slice of bits in little-endian format
and transforms it into a slice of little-endian u64 elements.
source§fn from_bits_be(bits: &[bool]) -> Result<Self>
fn from_bits_be(bits: &[bool]) -> Result<Self>
Returns a BigInteger by parsing a slice of bits in big-endian format
and transforms it into a slice of little-endian u64 elements.
source§impl FromBytes for BigInteger384
impl FromBytes for BigInteger384
source§impl Hash for BigInteger384
impl Hash for BigInteger384
source§impl Ord for BigInteger384
impl Ord for BigInteger384
source§impl PartialEq<BigInteger384> for BigInteger384
impl PartialEq<BigInteger384> for BigInteger384
source§fn eq(&self, other: &BigInteger384) -> bool
fn eq(&self, other: &BigInteger384) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<BigInteger384> for BigInteger384
impl PartialOrd<BigInteger384> for BigInteger384
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl ToBits for BigInteger384
impl ToBits for BigInteger384
source§fn to_bits_le(&self) -> Vec<bool>
fn to_bits_le(&self) -> Vec<bool>
Returns self as a boolean array in little-endian order, with trailing zeros.
source§fn to_bits_be(&self) -> Vec<bool>
fn to_bits_be(&self) -> Vec<bool>
Returns self as a boolean array in big-endian order, with leading zeros.