Fleet  0.0.9
Inference in the LOT
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
IntegerizedStack Class Reference

#include <IntegerizedStack.h>

Public Member Functions

 IntegerizedStack (value_t v=0)
 
value_t pop ()
 
value_t pop (value_t modulus)
 
void push (value_t x)
 
void push (value_t x, value_t modulus)
 
std::vector< value_t > split (size_t n)
 Split into n children – this is the same as looping and popping, but provides a nicer interface NOTE here that this is not just n pops – the last remaining amount is returned as the last value in the vector. NOTE: After doing this, the value=0 (since it's been poped into split) More...
 
value_t get_value () const
 
bool empty () const
 
void operator= (value_t z)
 
void operator-= (value_t x)
 
void operator+= (value_t x)
 

Static Public Member Functions

static std::pair< enumerationidx_t, enumerationidx_trosenberg_strong_decode (const enumerationidx_t z)
 
static enumerationidx_t rosenberg_strong_encode (const enumerationidx_t x, const enumerationidx_t y)
 
static std::pair< enumerationidx_t, enumerationidx_tmod_decode (const enumerationidx_t z, const enumerationidx_t k)
 
static enumerationidx_t mod_encode (const enumerationidx_t x, const enumerationidx_t y, const enumerationidx_t k)
 
static enumerationidx_t rosenberg_strong_pop (enumerationidx_t &z)
 
static enumerationidx_t mod_pop (enumerationidx_t &z, const enumerationidx_t k)
 

Protected Attributes

value_t value
 

Detailed Description

Author
piantado
Date
09/06/20

Constructor & Destructor Documentation

◆ IntegerizedStack()

IntegerizedStack::IntegerizedStack ( value_t  v = 0)
inline

Member Function Documentation

◆ empty()

bool IntegerizedStack::empty ( ) const
inline

◆ get_value()

value_t IntegerizedStack::get_value ( ) const
inline

◆ mod_decode()

static std::pair<enumerationidx_t,enumerationidx_t> IntegerizedStack::mod_decode ( const enumerationidx_t  z,
const enumerationidx_t  k 
)
inlinestatic

◆ mod_encode()

static enumerationidx_t IntegerizedStack::mod_encode ( const enumerationidx_t  x,
const enumerationidx_t  y,
const enumerationidx_t  k 
)
inlinestatic

◆ mod_pop()

static enumerationidx_t IntegerizedStack::mod_pop ( enumerationidx_t z,
const enumerationidx_t  k 
)
inlinestatic

◆ operator+=()

void IntegerizedStack::operator+= ( value_t  x)
inline

◆ operator-=()

void IntegerizedStack::operator-= ( value_t  x)
inline

◆ operator=()

void IntegerizedStack::operator= ( value_t  z)
inline

◆ pop() [1/2]

value_t IntegerizedStack::pop ( )
inline

◆ pop() [2/2]

value_t IntegerizedStack::pop ( value_t  modulus)
inline

◆ push() [1/2]

void IntegerizedStack::push ( value_t  x)
inline

◆ push() [2/2]

void IntegerizedStack::push ( value_t  x,
value_t  modulus 
)
inline

◆ rosenberg_strong_decode()

static std::pair<enumerationidx_t, enumerationidx_t> IntegerizedStack::rosenberg_strong_decode ( const enumerationidx_t  z)
inlinestatic

◆ rosenberg_strong_encode()

static enumerationidx_t IntegerizedStack::rosenberg_strong_encode ( const enumerationidx_t  x,
const enumerationidx_t  y 
)
inlinestatic

◆ rosenberg_strong_pop()

static enumerationidx_t IntegerizedStack::rosenberg_strong_pop ( enumerationidx_t z)
inlinestatic

◆ split()

std::vector<value_t> IntegerizedStack::split ( size_t  n)
inline

Split into n children – this is the same as looping and popping, but provides a nicer interface NOTE here that this is not just n pops – the last remaining amount is returned as the last value in the vector. NOTE: After doing this, the value=0 (since it's been poped into split)

Parameters
n
Returns

Member Data Documentation

◆ value

value_t IntegerizedStack::value
protected

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