Struct ark_r1cs_std::groups::curves::short_weierstrass::bls12::G2PreparedVar
source · pub struct G2PreparedVar<P: Bls12Config> { /* private fields */ }
Expand description
Represents the cached precomputation that can be performed on a G2 element which enables speeding up pairing computation.
Implementations§
source§impl<P: Bls12Config> G2PreparedVar<P>
impl<P: Bls12Config> G2PreparedVar<P>
sourcepub fn from_group_var(q: &G2Var<P>) -> Result<Self, SynthesisError>
pub fn from_group_var(q: &G2Var<P>) -> Result<Self, SynthesisError>
Constructs Self
from a G2Var
.
Trait Implementations§
source§impl<P: Bls12Config> AllocVar<G2Prepared<P>, <P as Bls12Config>::Fp> for G2PreparedVar<P>
impl<P: Bls12Config> AllocVar<G2Prepared<P>, <P as Bls12Config>::Fp> for G2PreparedVar<P>
source§fn new_variable<T: Borrow<G2Prepared<P>>>(
cs: impl Into<Namespace<P::Fp>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
mode: AllocationMode
) -> Result<Self, SynthesisError>
fn new_variable<T: Borrow<G2Prepared<P>>>(
cs: impl Into<Namespace<P::Fp>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
mode: AllocationMode
) -> Result<Self, SynthesisError>
Allocates a new variable of type
Self
in the ConstraintSystem
cs
.
The mode of allocation is decided by mode
.source§fn new_constant(
cs: impl Into<Namespace<F>>,
t: impl Borrow<V>
) -> Result<Self, SynthesisError>
fn new_constant(
cs: impl Into<Namespace<F>>,
t: impl Borrow<V>
) -> Result<Self, SynthesisError>
source§fn new_input<T: Borrow<V>>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>
) -> Result<Self, SynthesisError>
fn new_input<T: Borrow<V>>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>
) -> Result<Self, SynthesisError>
Allocates a new public input of type
Self
in the ConstraintSystem
cs
.source§fn new_witness<T: Borrow<V>>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>
) -> Result<Self, SynthesisError>
fn new_witness<T: Borrow<V>>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>
) -> Result<Self, SynthesisError>
Allocates a new private witness of type
Self
in the ConstraintSystem
cs
.