[][src]Trait snarkos_models::gadgets::utilities::select::CondSelectGadget

pub trait CondSelectGadget<F: Field> where
    Self: Sized
{ fn conditionally_select<CS: ConstraintSystem<F>>(
        cs: CS,
        cond: &Boolean,
        first: &Self,
        second: &Self
    ) -> Result<Self, SynthesisError>;
fn cost() -> usize; }

If condition is true, return first; else, select second.

Required methods

fn conditionally_select<CS: ConstraintSystem<F>>(
    cs: CS,
    cond: &Boolean,
    first: &Self,
    second: &Self
) -> Result<Self, SynthesisError>

fn cost() -> usize

Loading content...

Implementors

impl<F: PrimeField> CondSelectGadget<F> for Boolean[src]

impl<F: PrimeField> CondSelectGadget<F> for FpGadget<F>[src]

impl<F: PrimeField> CondSelectGadget<F> for AllocatedBit[src]

impl<F: PrimeField> CondSelectGadget<F> for UInt128[src]

impl<F: PrimeField> CondSelectGadget<F> for UInt8[src]

impl<F: PrimeField> CondSelectGadget<F> for UInt16[src]

impl<F: PrimeField> CondSelectGadget<F> for UInt32[src]

impl<F: PrimeField> CondSelectGadget<F> for UInt64[src]

impl<P, F: PrimeField> CondSelectGadget<F> for Fp6Gadget<P, F> where
    P: Fp6Parameters,
    P::Fp2Params: Fp2Parameters<Fp = F>, 
[src]

impl<P, F: PrimeField> CondSelectGadget<F> for Fp12Gadget<P, F> where
    P: Fp12Parameters,
    <P::Fp6Params as Fp6Parameters>::Fp2Params: Fp2Parameters<Fp = F>, 
[src]

impl<P: Fp2Parameters<Fp = F>, F: PrimeField> CondSelectGadget<F> for Fp2Gadget<P, F>[src]

Loading content...