Function plonk_gadgets::scalar::conditionally_select_zero [−][src]
pub fn conditionally_select_zero(
composer: &mut StandardComposer,
x: Variable,
select: Variable
) -> Variable
Expand description
Conditionally selects the value provided or a zero instead.
NOTE that the select
input has to be previously constrained to
be either one
or zero
.
Performs:
x’ = x if select = 1 x’ = 0 if select = 0