pub trait BundleGadgets: Fancy {
// Provided methods
fn encode_bundle(
&mut self,
values: &[u16],
moduli: &[u16],
channel: &mut Channel<'_>,
) -> Result<Bundle<Self::Item>> { ... }
fn receive_bundle(
&mut self,
moduli: &[u16],
channel: &mut Channel<'_>,
) -> Result<Bundle<Self::Item>> { ... }
fn encode_bundles(
&mut self,
values: &[Vec<u16>],
moduli: &[Vec<u16>],
channel: &mut Channel<'_>,
) -> Result<Vec<Bundle<Self::Item>>> { ... }
fn receive_many_bundles(
&mut self,
moduli: &[Vec<u16>],
channel: &mut Channel<'_>,
) -> Result<Vec<Bundle<Self::Item>>> { ... }
fn constant_bundle(
&mut self,
xs: &[u16],
ps: &[u16],
channel: &mut Channel<'_>,
) -> Result<Bundle<Self::Item>> { ... }
fn output_bundle(
&mut self,
x: &Bundle<Self::Item>,
channel: &mut Channel<'_>,
) -> Result<Option<Vec<u16>>> { ... }
fn output_bundles(
&mut self,
xs: &[Bundle<Self::Item>],
channel: &mut Channel<'_>,
) -> Result<Option<Vec<Vec<u16>>>> { ... }
fn shift(
&mut self,
x: &Bundle<Self::Item>,
n: usize,
channel: &mut Channel<'_>,
) -> Result<Bundle<Self::Item>> { ... }
fn shift_extend(
&mut self,
x: &Bundle<Self::Item>,
n: usize,
channel: &mut Channel<'_>,
) -> Result<Bundle<Self::Item>> { ... }
}Expand description
Extension trait for Fancy which provides Bundle constructions which are not necessarily CRT nor binary-based.
Provided Methods§
Sourcefn encode_bundle(
&mut self,
values: &[u16],
moduli: &[u16],
channel: &mut Channel<'_>,
) -> Result<Bundle<Self::Item>>
fn encode_bundle( &mut self, values: &[u16], moduli: &[u16], channel: &mut Channel<'_>, ) -> Result<Bundle<Self::Item>>
Encode a bundle.
Sourcefn receive_bundle(
&mut self,
moduli: &[u16],
channel: &mut Channel<'_>,
) -> Result<Bundle<Self::Item>>
fn receive_bundle( &mut self, moduli: &[u16], channel: &mut Channel<'_>, ) -> Result<Bundle<Self::Item>>
Receive a bundle.
Sourcefn encode_bundles(
&mut self,
values: &[Vec<u16>],
moduli: &[Vec<u16>],
channel: &mut Channel<'_>,
) -> Result<Vec<Bundle<Self::Item>>>
fn encode_bundles( &mut self, values: &[Vec<u16>], moduli: &[Vec<u16>], channel: &mut Channel<'_>, ) -> Result<Vec<Bundle<Self::Item>>>
Sourcefn receive_many_bundles(
&mut self,
moduli: &[Vec<u16>],
channel: &mut Channel<'_>,
) -> Result<Vec<Bundle<Self::Item>>>
fn receive_many_bundles( &mut self, moduli: &[Vec<u16>], channel: &mut Channel<'_>, ) -> Result<Vec<Bundle<Self::Item>>>
Receive many input bundles.
Sourcefn constant_bundle(
&mut self,
xs: &[u16],
ps: &[u16],
channel: &mut Channel<'_>,
) -> Result<Bundle<Self::Item>>
fn constant_bundle( &mut self, xs: &[u16], ps: &[u16], channel: &mut Channel<'_>, ) -> Result<Bundle<Self::Item>>
Creates a bundle of constant wires using moduli ps.
Sourcefn output_bundle(
&mut self,
x: &Bundle<Self::Item>,
channel: &mut Channel<'_>,
) -> Result<Option<Vec<u16>>>
fn output_bundle( &mut self, x: &Bundle<Self::Item>, channel: &mut Channel<'_>, ) -> Result<Option<Vec<u16>>>
Output the wires that make up a bundle.
Sourcefn output_bundles(
&mut self,
xs: &[Bundle<Self::Item>],
channel: &mut Channel<'_>,
) -> Result<Option<Vec<Vec<u16>>>>
fn output_bundles( &mut self, xs: &[Bundle<Self::Item>], channel: &mut Channel<'_>, ) -> Result<Option<Vec<Vec<u16>>>>
Output a slice of bundles.