HEaaN
Crypto Lab's great homomorphic encryption library
Public Types | Public Member Functions | Private Attributes | List of all members
HEaaN::Message Class Reference

#include <Message.hpp>

Public Types

using MessageIterator = Complex *
 
using ConstMessageIterator = const Complex *
 

Public Member Functions

 Message ()
 
 Message (u64 log_slots)
 Create an uninitialized message. More...
 
 Message (u64 log_slots, Complex initial)
 Create a message filled with a given value. More...
 
Complexoperator[] (u64 idx)
 
const Complexoperator[] (u64 idx) const
 
bool isEmpty () const
 Determine whether the message is empty or not. More...
 
u64 getLogSlots () const
 Get log(number of slots) of a message. More...
 
u64 getSize () const
 
void resize (u64 size)
 
MessageIterator begin () noexcept
 
ConstMessageIterator begin () const noexcept
 
MessageIterator end () noexcept
 
ConstMessageIterator end () const noexcept
 
auto rbegin ()
 
auto rbegin () const
 
auto rend ()
 
auto rend () const
 
template<class Archive >
void serialize (Archive &ar)
 
void to (const Device &device)
 
void allocate (const Device &device)
 
const DevicegetDevice () const
 
void save (const std::string &path) const
 
void save (std::ostream &stream) const
 
void load (const std::string &path)
 
void load (std::istream &stream)
 

Private Attributes

Pointer< MessageImpl > impl_
 

Member Typedef Documentation

◆ ConstMessageIterator

◆ MessageIterator

Constructor & Destructor Documentation

◆ Message() [1/3]

HEaaN::Message::Message ( )

◆ Message() [2/3]

HEaaN::Message::Message ( u64  log_slots)
explicit

Create an uninitialized message.

Parameters
[in]log_slotsThe number of log(slots).

A message which has two to log_slots slots is constructed. Because each slot, which is a complex number, is not initialized, you have to fill them by yourself.

◆ Message() [3/3]

HEaaN::Message::Message ( u64  log_slots,
Complex  initial 
)
explicit

Create a message filled with a given value.

Parameters
[in]log_slotsThe number of log(slots).
[in]initialThe value of each slot.

A message which has two to log_slots slots whose values are initial is constructed..

Member Function Documentation

◆ allocate()

void HEaaN::Message::allocate ( const Device device)

◆ begin() [1/2]

ConstMessageIterator HEaaN::Message::begin ( ) const
noexcept

◆ begin() [2/2]

MessageIterator HEaaN::Message::begin ( )
noexcept

◆ end() [1/2]

ConstMessageIterator HEaaN::Message::end ( ) const
noexcept

◆ end() [2/2]

MessageIterator HEaaN::Message::end ( )
noexcept

◆ getDevice()

const Device& HEaaN::Message::getDevice ( ) const

◆ getLogSlots()

u64 HEaaN::Message::getLogSlots ( ) const

Get log(number of slots) of a message.

Returns
log(number of slots)

◆ getSize()

u64 HEaaN::Message::getSize ( ) const

◆ isEmpty()

bool HEaaN::Message::isEmpty ( ) const

Determine whether the message is empty or not.

Returns
true if the message is empty, false otherwise

◆ load() [1/2]

void HEaaN::Message::load ( const std::string &  path)

◆ load() [2/2]

void HEaaN::Message::load ( std::istream &  stream)

◆ operator[]() [1/2]

Complex& HEaaN::Message::operator[] ( u64  idx)

◆ operator[]() [2/2]

const Complex& HEaaN::Message::operator[] ( u64  idx) const

◆ rbegin() [1/2]

auto HEaaN::Message::rbegin ( )
inline

◆ rbegin() [2/2]

auto HEaaN::Message::rbegin ( ) const
inline

◆ rend() [1/2]

auto HEaaN::Message::rend ( )
inline

◆ rend() [2/2]

auto HEaaN::Message::rend ( ) const
inline

◆ resize()

void HEaaN::Message::resize ( u64  size)

◆ save() [1/2]

void HEaaN::Message::save ( const std::string &  path) const

◆ save() [2/2]

void HEaaN::Message::save ( std::ostream &  stream) const

◆ serialize()

template<class Archive >
void HEaaN::Message::serialize ( Archive &  ar)

◆ to()

void HEaaN::Message::to ( const Device device)

Member Data Documentation

◆ impl_

Pointer<MessageImpl> HEaaN::Message::impl_
private

The documentation for this class was generated from the following file: