pub trait FancyProj: Fancy {
// Required method
fn proj(
&mut self,
x: &Self::Item,
q: u16,
tt: Option<Vec<u16>>,
channel: &mut Channel<'_>,
) -> Result<Self::Item>;
// Provided method
fn mod_change(
&mut self,
x: &Self::Item,
to_modulus: u16,
channel: &mut Channel<'_>,
) -> Result<Self::Item> { ... }
}Expand description
Required Methods§
Sourcefn proj(
&mut self,
x: &Self::Item,
q: u16,
tt: Option<Vec<u16>>,
channel: &mut Channel<'_>,
) -> Result<Self::Item>
fn proj( &mut self, x: &Self::Item, q: u16, tt: Option<Vec<u16>>, channel: &mut Channel<'_>, ) -> Result<Self::Item>
Project x according to the truth table tt. Resulting wire has modulus q.
Optional tt is useful for hiding the gate from the evaluator.
§Panics
This may panic in certain implementations if tt is None when it
should be Some. In addition, it may panic if tt is improperly
formed: either the length of tt is smaller than xs modulus, or the
values in tt are larger than q.
Provided Methods§
Sourcefn mod_change(
&mut self,
x: &Self::Item,
to_modulus: u16,
channel: &mut Channel<'_>,
) -> Result<Self::Item>
fn mod_change( &mut self, x: &Self::Item, to_modulus: u16, channel: &mut Channel<'_>, ) -> Result<Self::Item>
Change the modulus of x to to_modulus using a projection gate.