CleartextVectorEncodingEngine

Trait CleartextVectorEncodingEngine 

Source
pub trait CleartextVectorEncodingEngine<EncoderVector, CleartextVector, PlaintextVector>: AbstractEngine
where EncoderVector: EncoderVectorEntity, CleartextVector: CleartextVectorEntity, PlaintextVector: PlaintextVectorEntity,
{ // Required methods 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§

Source

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.

Source

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§

Source§

impl CleartextVectorEncodingEngine<FloatEncoderVector, CleartextVectorF64, PlaintextVector32> for DefaultEngine

§Description:

Implementation of CleartextVectorEncodingEngine for DefaultEngine that encodes 64 bits floating point numbers to 32 bits integers.

Source§

impl CleartextVectorEncodingEngine<FloatEncoderVector, CleartextVectorF64, PlaintextVector64> for DefaultEngine

§Description:

Implementation of CleartextVectorEncodingEngine for DefaultEngine that encodes 64 bits floating point numbers to 64 bits integers.