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

◆ ConfigurationRestriction()

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

◆ check()

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.

◆ findComplex()

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

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

Referenced by reduceOpenBits().

◆ getOpenBits()

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

get counter of open bits during constraint resolution

Returns
open bit counter

References openBits.

◆ reduceOpenBits()

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

Decrease the counter of open bits during constraint resolution.

References findComplex(), and openBits.

◆ reset()

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

resets constraint resolution state

References openBits, and parameters.

◆ resolve()

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().

◆ resolveComplex()

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

Member Data Documentation

◆ bias

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

value the product of the restricted bits must be equal to

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

◆ openBits

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

number of open (unset) bits during constraint resolution

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

◆ parameters

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: