Sense of constraints. More...
#include <ogdf/lib/abacus/csense.h>
Inheritance diagram for abacus::CSense:Public Types | |
| enum | SENSE { Less , Equal , Greater } |
Public Member Functions | |
| CSense () | |
| Default constructor, sense is undefined. | |
| CSense (char s) | |
| Initializes the sense of the constraint specified with a single letter. | |
| CSense (const SENSE s) | |
| Initializes the sense to s. | |
| const CSense & | operator= (SENSE rhs) |
| Assignment operator. | |
| SENSE | sense () const |
| Returns the sense of the constraint. | |
| void | sense (char s) |
| Changes the sense of the constraint given a letter s. | |
| void | sense (SENSE s) |
| Changes the sense of the constraint. | |
Public Member Functions inherited from abacus::AbacusRoot | |
| virtual | ~AbacusRoot () |
| The destructor. | |
Private Attributes | |
| SENSE | sense_ |
| Stores the sense of a constraint. | |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const CSense &rhs) |
| Output operator for constraint senses. | |
Additional Inherited Members | |
Static Public Member Functions inherited from abacus::AbacusRoot | |
| static bool | ascii2bool (const string &str) |
| Converts the string str to a boolean value. | |
| static bool | endsWith (const string &str, const string &end) |
| Returns true if str ends with end, false otherwise. | |
| static double | fracPart (double x) |
| Returns the absolute value of the fractional part of x. | |
| static const char * | onOff (bool value) |
| Converts a boolean variable to the strings "on" and "off". | |
Sense of constraints.
The most important objects in a cutting plane algorithm are constraints, which can be equations (Equal) or inequalities with the sense Less or Greater. We implement the sense of optimization as a class since we require it both in the classes Constraint and Row.
|
inline |
| abacus::CSense::CSense | ( | char | s | ) |
Initializes the sense of the constraint specified with a single letter.
| s | A character representing the sense: E or e stand for Equal, G and g stand for Greater, and L or l stand for Less. |
|
inline |
Changes the sense of the constraint given a letter s.
| s | The new sense. |
Output operator for constraint senses.
The output operator writes the sense on an output stream in the form <=, =, or >=.
| out | The output stream. |
| rhs | The sense being output. |
|
private |