Function neptune::circuit::mul_pre_sum

source ·
pub fn mul_pre_sum<CS, Scalar: PrimeField>(
    cs: CS,
    a: &AllocatedNum<Scalar>,
    b: &AllocatedNum<Scalar>,
    to_add: Scalar,
    enforce: bool,
) -> Result<AllocatedNum<Scalar>, SynthesisError>
where CS: ConstraintSystem<Scalar>,
Expand description

Calculates a * (b + to_add) — and enforces that constraint.