Class CoefPackedEncoding

Inheritance Relationships

Base Type

Class Documentation

class lbcrypto::CoefPackedEncoding : public lbcrypto::PlaintextImpl

Inheritence diagram for lbcrypto::CoefPackedEncoding:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "2" [label="lbcrypto::PlaintextImpl" tooltip="lbcrypto::PlaintextImpl"] "1" [label="lbcrypto::CoefPackedEncoding" tooltip="lbcrypto::CoefPackedEncoding" fillcolor="#BFBFBF"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for lbcrypto::CoefPackedEncoding:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "12" [label="lbcrypto::ILElement< DerivedType, BigVecType >" tooltip="lbcrypto::ILElement< DerivedType, BigVecType >"] "9" [label="lbcrypto::BigIntegerInterface< NativeIntegerT< NativeInt > >" tooltip="lbcrypto::BigIntegerInterface< NativeIntegerT< NativeInt > >"] "2" [label="lbcrypto::PlaintextImpl" tooltip="lbcrypto::PlaintextImpl"] "8" [label="intnat::NativeIntegerT< NativeInt >" tooltip="intnat::NativeIntegerT< NativeInt >"] "6" [label="lbcrypto::Serializable" tooltip="lbcrypto::Serializable"] "1" [label="lbcrypto::CoefPackedEncoding" tooltip="lbcrypto::CoefPackedEncoding" fillcolor="#BFBFBF"] "10" [label="lbcrypto::DCRTPolyImpl< BigVector >" tooltip="lbcrypto::DCRTPolyImpl< BigVector >"] "11" [label="lbcrypto::DCRTPolyInterface< DerivedType, BigVecType, LilVecType, RNSContainerType >" tooltip="lbcrypto::DCRTPolyInterface< DerivedType, BigVecType, LilVecType, RNSContainerType >"] "4" [label="lbcrypto::PolyInterface< DerivedType, VecType, ContainerType >" tooltip="lbcrypto::PolyInterface< DerivedType, VecType, ContainerType >"] "5" [label="lbcrypto::ILElement< DerivedType, VecType >" tooltip="lbcrypto::ILElement< DerivedType, VecType >"] "3" [label="lbcrypto::PolyImpl< NativeVector >" tooltip="lbcrypto::PolyImpl< NativeVector >"] "7" [label="lbcrypto::PolyImpl< BigVector >" tooltip="lbcrypto::PolyImpl< BigVector >"] "12" -> "6" [dir=forward tooltip="public-inheritance"] "2" -> "3" [dir=forward tooltip="usage"] "2" -> "7" [dir=forward tooltip="usage"] "2" -> "8" [dir=forward tooltip="usage"] "2" -> "10" [dir=forward tooltip="usage"] "8" -> "9" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "10" -> "11" [dir=forward tooltip="public-inheritance"] "11" -> "12" [dir=forward tooltip="public-inheritance"] "4" -> "5" [dir=forward tooltip="public-inheritance"] "5" -> "6" [dir=forward tooltip="public-inheritance"] "3" -> "4" [dir=forward tooltip="public-inheritance"] "7" -> "4" [dir=forward tooltip="public-inheritance"] }

Public Functions

template<typename T, typename std::enable_if<std::is_same<T, Poly::Params>::value || std::is_same<T, NativePoly::Params>::value || std::is_same<T, DCRTPoly::Params>::value, bool>::type = true>
inline CoefPackedEncoding(std::shared_ptr<T> vp, EncodingParams ep, SCHEME schemeId = SCHEME::INVALID_SCHEME)
template<typename T, typename std::enable_if<std::is_same<T, Poly::Params>::value || std::is_same<T, NativePoly::Params>::value || std::is_same<T, DCRTPoly::Params>::value, bool>::type = true>
inline CoefPackedEncoding(std::shared_ptr<T> vp, EncodingParams ep, const std::vector<int64_t> &coeffs, SCHEME schemeId = SCHEME::INVALID_SCHEME)
virtual ~CoefPackedEncoding() = default
inline virtual const std::vector<int64_t> &GetCoefPackedValue() const

GetCoeffsValue

Returns

the un-encoded scalar

inline virtual void SetIntVectorValue(const std::vector<int64_t> &val)

SetIntVectorValue

Parameters

val – integer vector to initialize the plaintext

virtual bool Encode()

Encode the plaintext into the Poly

Returns

true on success

virtual bool Decode()

Decode the Poly into the string

Returns

true on success

inline virtual PlaintextEncodings GetEncodingType() const

GetEncodingType

Returns

this is a COEF_PACKED_ENCODING encoding

inline virtual size_t GetLength() const

Get length of the plaintext

Returns

number of elements in this plaintext

inline virtual void SetLength(size_t siz)

SetLength of the plaintext to the given size

Parameters

siz

inline virtual bool CompareTo(const PlaintextImpl &other) const

Method to compare two plaintext to test for equivalence Testing that the plaintexts are of the same type done in operator==

Parameters

other – - the other plaintext to compare to.

Returns

whether the two plaintext are equivalent.

inline virtual void PrintValue(std::ostream &out) const

PrintValue - used by operator<< for this object

Parameters

out