halo2_ecc::fields

Trait Selectable

Source
pub trait Selectable<F: ScalarField, Pt> {
    // Required methods
    fn select(
        &self,
        ctx: &mut Context<F>,
        a: Pt,
        b: Pt,
        sel: AssignedValue<F>,
    ) -> Pt;
    fn select_by_indicator(
        &self,
        ctx: &mut Context<F>,
        a: &impl AsRef<[Pt]>,
        coeffs: &[AssignedValue<F>],
    ) -> Pt;
}

Required Methods§

Source

fn select( &self, ctx: &mut Context<F>, a: Pt, b: Pt, sel: AssignedValue<F>, ) -> Pt

Source

fn select_by_indicator( &self, ctx: &mut Context<F>, a: &impl AsRef<[Pt]>, coeffs: &[AssignedValue<F>], ) -> Pt

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'range, F: BigPrimeField, Fp: BigPrimeField> Selectable<F, CRTInteger<F>> for FpChip<'range, F, Fp>

Source§

impl<'range, F: BigPrimeField, Fp: BigPrimeField> Selectable<F, ProperCrtUint<F>> for FpChip<'range, F, Fp>

Source§

impl<F: BigPrimeField, Fp, Pt: Clone, FC> Selectable<F, Reduced<Pt, Fp>> for FC
where FC: Selectable<F, Pt>,