pub fn assign_to_circuit<T>(
circuit: &Circuit<T>,
inputs: impl IntoIterator<Item = (T, bool)>,
) -> (Circuit<T>, Vec<OutputEntry<T>>, Vec<OutputEntry<T>>)Expand description
Assigns inputs to circuit.
Generates circuit that calculates outputs as original circuit with assigned inputs
(if assume circuit input have specified value). inputs iterator is list of
circuit input (input indices) to assign. The entry of list is pair of
circit input index and its value to assign. Function while assigning values to inputs
reduces circuit and their inputs and outputs if needed. A function doesn’t optimize
circuit.
Function returns assigned circuit, list of mapping of original circuit inputs and
list of mapping original circuit outputs. Both lists contains OutputEntry
that it is NewIndex if circuit input or circuit output is stored in new index or
have Value if circuit input is assigned or circuit outputs are calculated to value.
An entry index from list is original index of circuit input or circuit output.