Struct concrete_core::crypto::encoding::RealEncoder [−][src]
pub struct RealEncoder<T: FloatingPoint> { pub offset: T, pub delta: T, }
Expand description
An encoder for real cleartexts
Fields
offset: T
The offset of the encoding
delta: T
The delta of the encoding
Trait Implementations
impl<RawScalar, EncScalar> Encoder<EncScalar> for RealEncoder<RawScalar> where
EncScalar: UnsignedTorus + FromTorus<RawScalar> + IntoTorus<RawScalar>,
RawScalar: FloatingPoint,
impl<RawScalar, EncScalar> Encoder<EncScalar> for RealEncoder<RawScalar> where
EncScalar: UnsignedTorus + FromTorus<RawScalar> + IntoTorus<RawScalar>,
RawScalar: FloatingPoint,
type Raw = RawScalar
type Raw = RawScalar
The type of the cleartexts.
Encodes a single cleartext. Read more
Decodes a single encoded value. Read more
fn encode_list<RawCont, EncCont>(
&self,
encoded: &mut PlaintextList<EncCont>,
raw: &CleartextList<RawCont>
) where
CleartextList<RawCont>: AsRefTensor<Element = RawScalar>,
PlaintextList<EncCont>: AsMutTensor<Element = EncScalar>,
fn encode_list<RawCont, EncCont>(
&self,
encoded: &mut PlaintextList<EncCont>,
raw: &CleartextList<RawCont>
) where
CleartextList<RawCont>: AsRefTensor<Element = RawScalar>,
PlaintextList<EncCont>: AsMutTensor<Element = EncScalar>,
Encodes a list of cleartexts to a list of plaintexts. Read more
fn decode_list<RawCont, EncCont>(
&self,
raw: &mut CleartextList<RawCont>,
encoded: &PlaintextList<EncCont>
) where
CleartextList<RawCont>: AsMutTensor<Element = RawScalar>,
PlaintextList<EncCont>: AsRefTensor<Element = EncScalar>,
fn decode_list<RawCont, EncCont>(
&self,
raw: &mut CleartextList<RawCont>,
encoded: &PlaintextList<EncCont>
) where
CleartextList<RawCont>: AsMutTensor<Element = RawScalar>,
PlaintextList<EncCont>: AsRefTensor<Element = EncScalar>,
Decodes a list of plaintexts into a list of cleartexts. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for RealEncoder<T> where
T: RefUnwindSafe,
impl<T> Send for RealEncoder<T> where
T: Send,
impl<T> Sync for RealEncoder<T> where
T: Sync,
impl<T> Unpin for RealEncoder<T> where
T: Unpin,
impl<T> UnwindSafe for RealEncoder<T> where
T: UnwindSafe,