SG++-Doxygen-Documentation
sgpp::datadriven::ConfigurationRestriction Class Reference

This class represents a constraint on the ConfigurationBits used by harmonica. More...

#include <ConfigurationRestriction.hpp>

Public Member Functions

bool check ()
 checks whether this constraint is satisfied with the current bit configuration More...
 
 ConfigurationRestriction (std::vector< ConfigurationBit * > &parameters, int bias)
 Constructor. More...
 
void findComplex ()
 
int getOpenBits ()
 get counter of open bits during constraint resolution More...
 
void reduceOpenBits ()
 Decrease the counter of open bits during constraint resolution. More...
 
void reset ()
 resets constraint resolution state More...
 
void resolve ()
 resolve constraint when there is only one open bit remaining More...
 
void resolveComplex (const std::string &id, const std::string &idtwo, int otherbias)
 

Protected Attributes

int bias
 value the product of the restricted bits must be equal to More...
 
int openBits = 0
 number of open (unset) bits during constraint resolution More...
 
std::vector< ConfigurationBit * > parameters
 bits affected by the constraint More...
 

Detailed Description

This class represents a constraint on the ConfigurationBits used by harmonica.

Constructor & Destructor Documentation

sgpp::datadriven::ConfigurationRestriction::ConfigurationRestriction ( std::vector< ConfigurationBit * > &  parameters,
int  bias 
)

Constructor.

Parameters
parametersbits restricted by this constraint
biasvalue the product of the restricted bits must be equal to

Member Function Documentation

bool sgpp::datadriven::ConfigurationRestriction::check ( )

checks whether this constraint is satisfied with the current bit configuration

Returns
true when constraint is satisfied

References bias, parameters, and analyse_erg::tmp.

void sgpp::datadriven::ConfigurationRestriction::findComplex ( )

References bias, python.statsfileInfo::i, and parameters.

Referenced by reduceOpenBits().

int sgpp::datadriven::ConfigurationRestriction::getOpenBits ( )

get counter of open bits during constraint resolution

Returns
open bit counter

References openBits.

void sgpp::datadriven::ConfigurationRestriction::reduceOpenBits ( )

Decrease the counter of open bits during constraint resolution.

References findComplex(), and openBits.

void sgpp::datadriven::ConfigurationRestriction::reset ( )

resets constraint resolution state

References openBits, and parameters.

void sgpp::datadriven::ConfigurationRestriction::resolve ( )

resolve constraint when there is only one open bit remaining

References bias, python.statsfileInfo::i, parameters, and analyse_erg::tmp.

Referenced by resolveComplex().

void sgpp::datadriven::ConfigurationRestriction::resolveComplex ( const std::string &  id,
const std::string &  idtwo,
int  otherbias 
)

Member Data Documentation

int sgpp::datadriven::ConfigurationRestriction::bias
protected

value the product of the restricted bits must be equal to

Referenced by check(), findComplex(), resolve(), and resolveComplex().

int sgpp::datadriven::ConfigurationRestriction::openBits = 0
protected

number of open (unset) bits during constraint resolution

Referenced by getOpenBits(), reduceOpenBits(), and reset().

std::vector<ConfigurationBit *> sgpp::datadriven::ConfigurationRestriction::parameters
protected

bits affected by the constraint

Referenced by check(), findComplex(), reset(), resolve(), and resolveComplex().


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