#include <EncryptedArray.h>

Public Member Functions

 PtxtArray (const EncryptedArray &ea_)
 
 PtxtArray (const Context &context)
 
 PtxtArray (const PtxtArray &)=default
 
template<class T >
 PtxtArray (const EncryptedArray &ea, const T &t)
 
template<class T >
 PtxtArray (const Context &context, const T &t)
 
PtxtArrayoperator= (const PtxtArray &other)
 
template<class T >
PtxtArrayoperator= (const T &t)
 
const EncryptedArraygetView () const
 
const EncryptedArraygetEA () const
 
long size () const
 
void encode (EncodedPtxt &eptxt, double mag=-1, OptLong prec=OptLong()) const
 
void encrypt (Ctxt &ctxt, double mag=-1, OptLong prec=OptLong()) const
 
void decrypt (const Ctxt &ctxt, const SecKey &sKey, OptLong prec=OptLong())
 
void rawDecrypt (const Ctxt &ctxt, const SecKey &sKey)
 
void decryptComplex (const Ctxt &ctxt, const SecKey &sKey, OptLong prec=OptLong())
 
void rawDecryptComplex (const Ctxt &ctxt, const SecKey &sKey)
 
void decryptReal (const Ctxt &ctxt, const SecKey &sKey, OptLong prec=OptLong())
 
void rawDecryptReal (const Ctxt &ctxt, const SecKey &sKey)
 
void randomReal ()
 
void randomComplex ()
 
void random ()
 
void load (const std::vector< int > &array)
 
void load (const std::vector< long > &array)
 
void load (const std::vector< NTL::ZZX > &array)
 
void load (const std::vector< cx_double > &array)
 
void load (const std::vector< double > &array)
 
void load (int val)
 
void load (long val)
 
void load (const NTL::ZZX &val)
 
void load (double val)
 
void load (cx_double val)
 
void load (const NTL::Vec< NTL::GF2 > &vec)
 
void load (const NTL::Vec< NTL::GF2X > &vec)
 
void load (const NTL::Vec< NTL::zz_p > &vec)
 
void load (const NTL::Vec< NTL::zz_pX > &vec)
 
void load (NTL::GF2 scalar)
 
void load (const NTL::GF2X &scalar)
 
void load (NTL::zz_p scalar)
 
void load (const NTL::zz_pX &scalar)
 
void store (std::vector< long > &array) const
 
void store (std::vector< NTL::ZZX > &array) const
 
void store (std::vector< cx_double > &array) const
 
void store (std::vector< double > &array) const
 
void negate ()
 
void writeToJSON (std::ostream &os) const
 
JsonWrapper writeToJSON () const
 
void readJSON (std::istream &is)
 
void readJSON (const JsonWrapper &jw)
 

Static Public Member Functions

static PtxtArray readFromJSON (std::istream &is, const Context &context)
 
static PtxtArray readFromJSON (const JsonWrapper &jw, const Context &context)
 

Public Attributes

const EncryptedArrayea
 
PlaintextArray pa
 

Static Public Attributes

static constexpr std::string_view typeName = "PtxtArray"
 Class label to be added to JSON serialization as object type information. More...
 

Friends

std::istream & operator>> (std::istream &is, PtxtArray &pa)
 
std::ostream & operator<< (std::ostream &os, const PtxtArray &pa)
 

Constructor & Destructor Documentation

◆ PtxtArray() [1/5]

helib::PtxtArray::PtxtArray ( const EncryptedArray ea_)
inlineexplicit

◆ PtxtArray() [2/5]

helib::PtxtArray::PtxtArray ( const Context context)
inlineexplicit

◆ PtxtArray() [3/5]

helib::PtxtArray::PtxtArray ( const PtxtArray )
default

◆ PtxtArray() [4/5]

template<class T >
helib::PtxtArray::PtxtArray ( const EncryptedArray ea,
const T &  t 
)
inline

◆ PtxtArray() [5/5]

template<class T >
helib::PtxtArray::PtxtArray ( const Context context,
const T &  t 
)
inline

Member Function Documentation

◆ decrypt()

void helib::PtxtArray::decrypt ( const Ctxt ctxt,
const SecKey sKey,
OptLong  prec = OptLong() 
)
inline

◆ decryptComplex()

void helib::PtxtArray::decryptComplex ( const Ctxt ctxt,
const SecKey sKey,
OptLong  prec = OptLong() 
)
inline

◆ decryptReal()

void helib::PtxtArray::decryptReal ( const Ctxt ctxt,
const SecKey sKey,
OptLong  prec = OptLong() 
)
inline

◆ encode()

void helib::PtxtArray::encode ( EncodedPtxt eptxt,
double  mag = -1,
OptLong  prec = OptLong() 
) const
inline

◆ encrypt()

void helib::PtxtArray::encrypt ( Ctxt ctxt,
double  mag = -1,
OptLong  prec = OptLong() 
) const
inline

◆ getEA()

const EncryptedArray& helib::PtxtArray::getEA ( ) const
inline

◆ getView()

const EncryptedArray& helib::PtxtArray::getView ( ) const
inline

◆ load() [1/18]

void helib::PtxtArray::load ( const NTL::GF2X &  scalar)
inline

◆ load() [2/18]

void helib::PtxtArray::load ( const NTL::Vec< NTL::GF2 > &  vec)
inline

◆ load() [3/18]

void helib::PtxtArray::load ( const NTL::Vec< NTL::GF2X > &  vec)
inline

◆ load() [4/18]

void helib::PtxtArray::load ( const NTL::Vec< NTL::zz_p > &  vec)
inline

◆ load() [5/18]

void helib::PtxtArray::load ( const NTL::Vec< NTL::zz_pX > &  vec)
inline

◆ load() [6/18]

void helib::PtxtArray::load ( const NTL::zz_pX &  scalar)
inline

◆ load() [7/18]

void helib::PtxtArray::load ( const NTL::ZZX &  val)
inline

◆ load() [8/18]

void helib::PtxtArray::load ( const std::vector< cx_double > &  array)
inline

◆ load() [9/18]

void helib::PtxtArray::load ( const std::vector< double > &  array)
inline

◆ load() [10/18]

void helib::PtxtArray::load ( const std::vector< int > &  array)
inline

◆ load() [11/18]

void helib::PtxtArray::load ( const std::vector< long > &  array)
inline

◆ load() [12/18]

void helib::PtxtArray::load ( const std::vector< NTL::ZZX > &  array)
inline

◆ load() [13/18]

void helib::PtxtArray::load ( cx_double  val)
inline

◆ load() [14/18]

void helib::PtxtArray::load ( double  val)
inline

◆ load() [15/18]

void helib::PtxtArray::load ( int  val)
inline

◆ load() [16/18]

void helib::PtxtArray::load ( long  val)
inline

◆ load() [17/18]

void helib::PtxtArray::load ( NTL::GF2  scalar)
inline

◆ load() [18/18]

void helib::PtxtArray::load ( NTL::zz_p  scalar)
inline

◆ negate()

void helib::PtxtArray::negate ( )
inline

◆ operator=() [1/2]

PtxtArray& helib::PtxtArray::operator= ( const PtxtArray other)
inline

◆ operator=() [2/2]

template<class T >
PtxtArray& helib::PtxtArray::operator= ( const T &  t)
inline

◆ random()

void helib::PtxtArray::random ( )
inline

◆ randomComplex()

void helib::PtxtArray::randomComplex ( )
inline

◆ randomReal()

void helib::PtxtArray::randomReal ( )
inline

◆ rawDecrypt()

void helib::PtxtArray::rawDecrypt ( const Ctxt ctxt,
const SecKey sKey 
)
inline

◆ rawDecryptComplex()

void helib::PtxtArray::rawDecryptComplex ( const Ctxt ctxt,
const SecKey sKey 
)
inline

◆ rawDecryptReal()

void helib::PtxtArray::rawDecryptReal ( const Ctxt ctxt,
const SecKey sKey 
)
inline

◆ readFromJSON() [1/2]

PtxtArray helib::PtxtArray::readFromJSON ( const JsonWrapper jw,
const Context context 
)
static

◆ readFromJSON() [2/2]

PtxtArray helib::PtxtArray::readFromJSON ( std::istream &  is,
const Context context 
)
static

◆ readJSON() [1/2]

void helib::PtxtArray::readJSON ( const JsonWrapper jw)

◆ readJSON() [2/2]

void helib::PtxtArray::readJSON ( std::istream &  is)

◆ size()

long helib::PtxtArray::size ( ) const
inline

◆ store() [1/4]

void helib::PtxtArray::store ( std::vector< cx_double > &  array) const
inline

◆ store() [2/4]

void helib::PtxtArray::store ( std::vector< double > &  array) const
inline

◆ store() [3/4]

void helib::PtxtArray::store ( std::vector< long > &  array) const
inline

◆ store() [4/4]

void helib::PtxtArray::store ( std::vector< NTL::ZZX > &  array) const
inline

◆ writeToJSON() [1/2]

JsonWrapper helib::PtxtArray::writeToJSON ( ) const

◆ writeToJSON() [2/2]

void helib::PtxtArray::writeToJSON ( std::ostream &  os) const

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const PtxtArray pa 
)
friend

◆ operator>>

std::istream& operator>> ( std::istream &  is,
PtxtArray pa 
)
friend

Member Data Documentation

◆ ea

const EncryptedArray& helib::PtxtArray::ea

◆ pa

PlaintextArray helib::PtxtArray::pa

◆ typeName

constexpr std::string_view helib::PtxtArray::typeName = "PtxtArray"
staticconstexpr

Class label to be added to JSON serialization as object type information.