MTToolBox  0.2.10
Public Member Functions
MTToolBox::TemperingCalculatable< U, V > Class Template Referenceabstract

Users can search tempering parameters by making GF(2)-linear pseudo random generator class which inherits from this class. More...

#include <TemperingCalculatable.hpp>

Inheritance diagram for MTToolBox::TemperingCalculatable< U, V >:
MTToolBox::EquidistributionCalculatable< U, V > MTToolBox::RecursionSearchable< U, V > MTToolBox::AbstractGenerator< U >

Public Member Functions

virtual ~TemperingCalculatable ()
 Virtual destructor (always required) More...
 
virtual void setTemperingPattern (U mask, U pattern, int index)=0
 Set tempering parameters. More...
 
virtual void setUpTempering ()=0
 If preparing is needed before generation, here is the place to prepare tempering parameters. More...
 
virtual void setReverseOutput ()=0
 Changes bit order of output. More...
 
virtual void resetReverseOutput ()=0
 Reset bit order of output. More...
 
virtual bool isReverseOutput ()=0
 Shows if bit order is reversed. More...
 
- Public Member Functions inherited from MTToolBox::EquidistributionCalculatable< U, V >
virtual ~EquidistributionCalculatable ()
 Virtual destructor (always required) More...
 
virtual EquidistributionCalculatable< U, V > * clone () const =0
 Return copy of myself. More...
 
virtual U generate (int outBitLen)=0
 output outBitLen from MSB. More...
 
virtual void add (EquidistributionCalculatable< U, V > &that)=0
 Add internal state of GF(2)-linear pseudo random number generators. More...
 
virtual void setZero ()=0
 Set all zero to internal state. More...
 
virtual bool isZero () const =0
 Check if bits in internal state are all zero. More...
 
- Public Member Functions inherited from MTToolBox::RecursionSearchable< U, V >
virtual ~RecursionSearchable ()
 Virtual destructor (always required) More...
 
virtual void setUpParam (AbstractGenerator< V > &generator)=0
 Users should set parameters for their generator when this method is called. More...
 
virtual const std::string getHeaderString ()=0
 Returns header string of parameters. More...
 
virtual const std::string getParamString ()=0
 Returns string expression of parameters. More...
 
- Public Member Functions inherited from MTToolBox::AbstractGenerator< U >
virtual ~AbstractGenerator ()
 Virtual destructor (always required) More...
 
virtual U generate ()=0
 transit current internal state to next state and output a pseudo random number. More...
 
virtual void seed (U value)=0
 initialize internal state More...
 
virtual int bitSize () const =0
 Return bit size of internal state, i.e dimension of GF(2)-vector space. More...
 

Detailed Description

template<typename U, typename V = U>
class MTToolBox::TemperingCalculatable< U, V >

Users can search tempering parameters by making GF(2)-linear pseudo random generator class which inherits from this class.

Template Parameters
Utype of output of pseudo random number generator
Utype of output of pseudo random number generator
Vtype of output of parameter generator

Constructor & Destructor Documentation

template<typename U, typename V = U>
virtual MTToolBox::TemperingCalculatable< U, V >::~TemperingCalculatable ( )
inlinevirtual

Virtual destructor (always required)

Member Function Documentation

template<typename U, typename V = U>
virtual bool MTToolBox::TemperingCalculatable< U, V >::isReverseOutput ( )
pure virtual

Shows if bit order is reversed.

Returns
true if bit order id reversed
template<typename U, typename V = U>
virtual void MTToolBox::TemperingCalculatable< U, V >::resetReverseOutput ( )
pure virtual
template<typename U, typename V = U>
virtual void MTToolBox::TemperingCalculatable< U, V >::setReverseOutput ( )
pure virtual

Changes bit order of output.

MSB of output becomes LSB of output. This is useful to calculate lower bit equi-distribution.

Referenced by MTToolBox::AlgorithmPartialBitPattern< U, V, bit_len, param_num, try_bit_len, step, lsb >::operator()(), and MTToolBox::AlgorithmRecursionAndTempering< U, V >::search().

template<typename U, typename V = U>
virtual void MTToolBox::TemperingCalculatable< U, V >::setTemperingPattern ( mask,
pattern,
int  index 
)
pure virtual

Set tempering parameters.

Parameters
[in]maskShows which part of pattern should be set to parameter.
[in]patterna part of pattern set to tempering parameter
[in]indexindex of tempering parameters.

Referenced by MTToolBox::AlgorithmBestBits< U, V >::operator()().

template<typename U, typename V = U>
virtual void MTToolBox::TemperingCalculatable< U, V >::setUpTempering ( )
pure virtual

If preparing is needed before generation, here is the place to prepare tempering parameters.

Referenced by MTToolBox::AlgorithmBestBits< U, V >::operator()().


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