pub type FpConfig<F> = RangeConfig<F>;
Aliased Type§
struct FpConfig<F> {
pub gate: FlexGateConfig<F>,
pub lookup_advice: Vec<Vec<Column<Advice>>>,
pub q_lookup: Vec<Option<Selector>>,
pub lookup: TableColumn,
/* private fields */
}
Fields§
§gate: FlexGateConfig<F>
Underlying Gate Configuration
lookup_advice: Vec<Vec<Column<Advice>>>
Special advice (witness) Columns used only for lookup tables.
Each phase of a halo2 circuit has a distinct lookup_advice column.
- If
gate
has only 1 advice column, lookups are enabled for that column, in which caselookup_advice
is empty - If
gate
has more than 1 advice column some number of user-specifiedlookup_advice
columns are added- In this case, we don’t need a selector so
q_lookup
is empty
- In this case, we don’t need a selector so
q_lookup: Vec<Option<Selector>>
Selector values for the lookup table.
lookup: TableColumn
Column for lookup table values.
Implementations
Source§impl<F> RangeConfig<F>where
F: ScalarField,
impl<F> RangeConfig<F>where
F: ScalarField,
Sourcepub fn configure(
meta: &mut ConstraintSystem<F>,
gate_params: FlexGateConfigParams,
num_lookup_advice: &[usize],
lookup_bits: usize,
) -> RangeConfig<F>
pub fn configure( meta: &mut ConstraintSystem<F>, gate_params: FlexGateConfigParams, num_lookup_advice: &[usize], lookup_bits: usize, ) -> RangeConfig<F>
Generates a new RangeConfig with the specified parameters.
If num_columns
is 0, then we assume you do not want to perform any lookups in that phase.
Panics if lookup_bits
> 28.
meta
: ConstraintSystem of the circuitgate_params
: see FlexGateConfigParamsnum_lookup_advice
: Number oflookup_advice
Columns in each phaselookup_bits
: Number of bits represented in the LookUp table [0,2^lookup_bits)
Sourcepub fn lookup_bits(&self) -> usize
pub fn lookup_bits(&self) -> usize
Returns the number of bits represented in the lookup table [0,2^lookup_bits).
Trait Implementations
Source§impl<F> Clone for RangeConfig<F>where
F: Clone + ScalarField,
impl<F> Clone for RangeConfig<F>where
F: Clone + ScalarField,
Source§fn clone(&self) -> RangeConfig<F>
fn clone(&self) -> RangeConfig<F>
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 more