Struct snarkvm_parameters::testnet3::powers::PowersOfG
source · pub struct PowersOfG<E: PairingEngine> { /* private fields */ }
Expand description
A vector of powers of beta G.
Implementations§
source§impl<E: PairingEngine> PowersOfG<E>
impl<E: PairingEngine> PowersOfG<E>
sourcepub fn download_powers_for(&mut self, range: Range<usize>) -> Result<()>
pub fn download_powers_for(&mut self, range: Range<usize>) -> Result<()>
Download the powers of beta G specified by range
.
sourcepub fn num_powers(&self) -> usize
pub fn num_powers(&self) -> usize
Returns the number of contiguous powers of beta G starting from the 0-th power.
sourcepub fn max_num_powers(&self) -> usize
pub fn max_num_powers(&self) -> usize
Returns the maximum possible number of contiguous powers of beta G starting from the 0-th power.
sourcepub fn powers_of_beta_gamma_g(&self) -> Arc<BTreeMap<usize, E::G1Affine>>
pub fn powers_of_beta_gamma_g(&self) -> Arc<BTreeMap<usize, E::G1Affine>>
Returns the powers of beta * gamma G.
sourcepub fn power_of_beta_g(&mut self, index: usize) -> Result<E::G1Affine>
pub fn power_of_beta_g(&mut self, index: usize) -> Result<E::G1Affine>
Returns the index
-th power of beta * G.
sourcepub fn powers_of_beta_g(
&mut self,
range: Range<usize>
) -> Result<&[E::G1Affine]>
pub fn powers_of_beta_g( &mut self, range: Range<usize> ) -> Result<&[E::G1Affine]>
Returns the powers of beta * G
that lie within range
.
pub fn negative_powers_of_beta_h(&self) -> Arc<BTreeMap<usize, E::G2Affine>>
pub fn prepared_negative_powers_of_beta_h( &self ) -> Arc<BTreeMap<usize, <E::G2Affine as PairingCurve>::Prepared>>
pub fn beta_h(&self) -> E::G2Affine
Trait Implementations§
source§impl<E: PairingEngine> CanonicalDeserialize for PowersOfG<E>
impl<E: PairingEngine> CanonicalDeserialize for PowersOfG<E>
fn deserialize_with_mode<R: Read>( reader: R, compress: Compress, validate: Validate ) -> Result<Self, SerializationError>
fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where R: Read,
fn deserialize_compressed_unchecked<R>( reader: R ) -> Result<Self, SerializationError>where R: Read,
fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where R: Read,
fn deserialize_uncompressed_unchecked<R>( reader: R ) -> Result<Self, SerializationError>where R: Read,
source§impl<E: PairingEngine> CanonicalSerialize for PowersOfG<E>
impl<E: PairingEngine> CanonicalSerialize for PowersOfG<E>
fn serialize_with_mode<W: Write>( &self, writer: W, mode: Compress ) -> Result<(), SerializationError>
fn serialized_size(&self, mode: Compress) -> usize
fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where W: Write,
fn compressed_size(&self) -> usize
fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where W: Write,
fn uncompressed_size(&self) -> usize
source§impl<E: Clone + PairingEngine> Clone for PowersOfG<E>where
E::G1Affine: Clone,
E::G2Affine: Clone,
impl<E: Clone + PairingEngine> Clone for PowersOfG<E>where E::G1Affine: Clone, E::G2Affine: Clone,
source§impl<E: Debug + PairingEngine> Debug for PowersOfG<E>where
E::G1Affine: Debug,
E::G2Affine: Debug,
impl<E: Debug + PairingEngine> Debug for PowersOfG<E>where E::G1Affine: Debug, E::G2Affine: Debug,
source§impl<E: PairingEngine> FromBytes for PowersOfG<E>
impl<E: PairingEngine> FromBytes for PowersOfG<E>
source§impl<E: PairingEngine> ToBytes for PowersOfG<E>
impl<E: PairingEngine> ToBytes for PowersOfG<E>
source§impl<E: PairingEngine> Valid for PowersOfG<E>
impl<E: PairingEngine> Valid for PowersOfG<E>
fn check(&self) -> Result<(), SerializationError>
fn batch_check<'a>( batch: impl Iterator<Item = &'a Self> + Send ) -> Result<(), SerializationError>where Self: 'a,
Auto Trait Implementations§
impl<E> RefUnwindSafe for PowersOfG<E>where <E as PairingEngine>::G1Affine: RefUnwindSafe, <E as PairingEngine>::G2Affine: RefUnwindSafe, <<E as PairingEngine>::G2Affine as PairingCurve>::Prepared: RefUnwindSafe,
impl<E> Send for PowersOfG<E>
impl<E> Sync for PowersOfG<E>
impl<E> Unpin for PowersOfG<E>where <E as PairingEngine>::G1Affine: Unpin, <E as PairingEngine>::G2Affine: Unpin,
impl<E> UnwindSafe for PowersOfG<E>where <E as PairingEngine>::G1Affine: UnwindSafe + RefUnwindSafe, <E as PairingEngine>::G2Affine: UnwindSafe + RefUnwindSafe, <<E as PairingEngine>::G2Affine as PairingCurve>::Prepared: RefUnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more