pub trait CleartextVectorEncodingEngine<EncoderVector, CleartextVector, PlaintextVector>: AbstractEnginewhere
EncoderVector: EncoderVectorEntity,
CleartextVector: CleartextVectorEntity,
PlaintextVector: PlaintextVectorEntity,{
fn encode_cleartext_vector(
&mut self,
encoder_vector: &EncoderVector,
cleartext_vector: &CleartextVector
) -> Result<PlaintextVector, CleartextVectorEncodingError<Self::EngineError>>;
unsafe fn encode_cleartext_vector_unchecked(
&mut self,
encoder_vector: &EncoderVector,
cleartext_vector: &CleartextVector
) -> PlaintextVector;
}
Expand description
A trait for engines encoding cleartext vectors.
Semantics
This pure operation generates a plaintext vector containing the
element-wise encodings of the cleartext_vector
cleartext vector under the encoder_vector
encoder vector.
Formal Definition
Required Methods
sourcefn encode_cleartext_vector(
&mut self,
encoder_vector: &EncoderVector,
cleartext_vector: &CleartextVector
) -> Result<PlaintextVector, CleartextVectorEncodingError<Self::EngineError>>
fn encode_cleartext_vector(
&mut self,
encoder_vector: &EncoderVector,
cleartext_vector: &CleartextVector
) -> Result<PlaintextVector, CleartextVectorEncodingError<Self::EngineError>>
Encodes a cleartext vector into a plaintext vector.
sourceunsafe fn encode_cleartext_vector_unchecked(
&mut self,
encoder_vector: &EncoderVector,
cleartext_vector: &CleartextVector
) -> PlaintextVector
unsafe fn encode_cleartext_vector_unchecked(
&mut self,
encoder_vector: &EncoderVector,
cleartext_vector: &CleartextVector
) -> PlaintextVector
Unsafely encodes a cleartext vector into a plaintext vector.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of CleartextVectorEncodingError
. For safety concerns specific to an
engine, refer to the implementer safety section.
Implementors
impl CleartextVectorEncodingEngine<FloatEncoderVector, CleartextVectorF64, PlaintextVector32> for DefaultEngine
Description:
Implementation of CleartextVectorEncodingEngine
for DefaultEngine
that encodes 64 bits
floating point numbers to 32 bits integers.
impl CleartextVectorEncodingEngine<FloatEncoderVector, CleartextVectorF64, PlaintextVector64> for DefaultEngine
Description:
Implementation of CleartextVectorEncodingEngine
for DefaultEngine
that encodes 64 bits
floating point numbers to 64 bits integers.