Features
|
#include <fstream>
#include <iostream>
#include <vector>
#include <exception>
#include <cstdint>
Classes | |
class | combination_t |
class | difference_expression_generator |
Typedefs | |
using | maxnat_t = uintmax_t |
using | combination_element_t = unsigned short int |
using | difference_expression_t = vector< bool > |
Functions | |
maxnat_t | power (maxnat_t base, maxnat_t exponent) |
maxnat_t | ceil_div (const maxnat_t &x, const maxnat_t &y) |
difference_expression_t | operator~ (difference_expression_t de) |
difference_expression_t & | operator&= (difference_expression_t &left, const difference_expression_t &right) |
difference_expression_t & | operator|= (difference_expression_t &left, const difference_expression_t &right) |
ostream & | operator<< (ostream &os, const difference_expression_t &de) |
void | print_independent_features (const difference_expression_generator &dg) |
void | print_independent_features_alt (const difference_expression_generator &dg) |
void | print_not_features (const difference_expression_generator &dg) |
void | print_and_features (const difference_expression_generator &dg) |
void | print_or_features (const difference_expression_generator &dg) |
void | print_and_not_features (const difference_expression_generator &dg) |
void | print_or_not_features (const difference_expression_generator &dg) |
int | main () |
Variables | |
constexpr bool | checking { true } |
const string | prefix { "fl_" } |
fl in the program name is an acronym for Feature Location.
using combination_element_t = unsigned short int |
Type alias for the program specific name for the unsigned integer type that is used consistently for everything related to the combination_t class.
using difference_expression_t = vector<bool> |
Type alias for the program specific name for a difference expression to be used throughout the program.
using maxnat_t = uintmax_t |
Type alias for the program specific name for the unsigned integer type to be used throughout the program.
Returns the result of integral division of x by y rounded to the nearest upper integer value. The following code was taken from https://stackoverflow.com/questions/2745074/fast-ceiling-of-an-integer-division-in-c-c , Answer 3
x | Dividend. |
y | Divisor. |
difference_expression_t& operator&= | ( | difference_expression_t & | left, |
const difference_expression_t & | right | ||
) |
Performs bitwise-and assignment for difference expressions.
left | Difference expression passed as reference. |
right | Difference expression passed as reference to const. |
ostream& operator<< | ( | ostream & | os, |
const difference_expression_t & | de | ||
) |
Stream insertion operator for difference expressions.
os | Output stream passed as reference. |
de | Difference expression passed as reference to const. |
difference_expression_t& operator|= | ( | difference_expression_t & | left, |
const difference_expression_t & | right | ||
) |
Performs bitwise-or assignment for difference expressions.
left | Difference expression passed as reference. |
right | Difference expression passed as reference to const. |
difference_expression_t operator~ | ( | difference_expression_t | de | ) |
Calculates and returns bitwise negation of difference expression.
de | Difference expression passed by value. |
Calculates and returns the power of base and exponent.
base | Value for the base of the power expression. |
exponent | Value for the exponent of the power expression. |
void print_and_features | ( | const difference_expression_generator & | dg | ) |
Outputs difference expressions for and features to a file. This implementation creates and uses difference expressions.
dg | Difference generator to be used for generating difference expressions. |
void print_and_not_features | ( | const difference_expression_generator & | dg | ) |
Outputs difference expressions for and-not features to a file. This implementation creates and uses difference expressions.
dg | Difference generator to be used for generating difference expressions. |
void print_independent_features | ( | const difference_expression_generator & | dg | ) |
Outputs difference expressions for independent features to a file. This implementation creates and uses difference expressions.
dg | Difference generator to be used for generating difference expressions. |
void print_independent_features_alt | ( | const difference_expression_generator & | dg | ) |
Outputs difference expressions for independent features to a file. This implementation does neither create nor uses difference expressions! Instead, the value that indicates if a system is to be intersected or to be united is calculated for each individual system. Therefore, this function has minimal memory requirements. In general, it is possible to provide corresponding implementations for all other following functions whose names begin with print_.
dg | Difference generator to be used for generating difference expressions. |
void print_not_features | ( | const difference_expression_generator & | dg | ) |
Outputs difference expressions for not features to a file. This implementation creates and uses difference expressions.
dg | Difference generator to be used for generating difference expressions. |
void print_or_features | ( | const difference_expression_generator & | dg | ) |
Outputs difference expressions for or features to a file. This implementation creates and uses difference expressions.
dg | Difference generator to be used for generating difference expressions. |
void print_or_not_features | ( | const difference_expression_generator & | dg | ) |
Outputs difference expressions for or-not features to a file. This implementation creates and uses difference expressions.
dg | Difference generator to be used for generating difference expressions. |
|
constexpr |
checking turns some checks for errors on or off. Initializing checking to true, turns on error checking. Initializing checking to false, turns off error checking. checking should always be tested wit hif constexpr. Only then, the code performing the actual check will not be included in the object code if checking is initialized to false.
const string prefix { "fl_" } |
This string constant defines the prefix that is used consistently for the names of all files that are produced by the program.