74 if (status == Fixed || status == Set) {
75 Logger::ifout() <<
"FSVarStat::FSVarStat(): value to set/fix missing\n";
88 if (status != Fixed && status != Set) {
89 Logger::ifout() <<
"FSVarStat::FSVarStat(): wrong status for this constructor\n";
98 FSVarStat(
FSVarStat *fsVarStat) : glob_(fsVarStat->glob_), status_(fsVarStat->status_), value_(fsVarStat->value_) { }
140 status_ =
stat->status_;
141 value_ =
stat->value_;
145 double value()
const {
return value_; }
161 return (status_ != Free);
Global data and functions.
Base class of all other classes of ABACUS.
Status of fixed and set variables.
STATUS
The enumeration defining the different statuses of variables from the point of view of fixing and set...
@ FixedToLowerBound
The variable is fixed to its lower bound.
@ Fixed
The variable is fixed to a value which can be accessed with the member function value().
@ Free
The variable is neither fixed nor set.
@ SetToLowerBound
The variable is set to its lower bound.
@ Set
The variable is set to a value which can be accessed with the member function value().
@ SetToUpperBound
The variable is set to its upper bound.
void status(STATUS stat, double val)
Assigns a new status also for the statuses Fixed and Set.
FSVarStat(AbacusGlobal *glob, STATUS status)
Initializes the status to status.
FSVarStat(FSVarStat *fsVarStat)
Initializes the status as in fsVarStat.
bool contradiction(STATUS status, double value=0) const
Returns whether there is a contradiction.
bool fixedOrSet() const
Returns false if the status is Free, true otherwise.
bool set() const
Returns true if the status is SetToLowerBound, Set, or SetToUpperBound; false otherwise.
void status(STATUS stat)
Assigns a new status.
friend std::ostream & operator<<(std::ostream &out, const FSVarStat &rhs)
Output operator.
bool fixed() const
Returns true if the status is FixedToLowerBound, Fixed, orFixedToUpperBound; false otherwise.
void status(const FSVarStat *stat)
Assigns the status as in stat.
void value(double val)
Assigns a new value of fixing or setting.
double value_
The value the variable is fixed/set to.
AbacusGlobal * glob_
A pointer to the corresponding global object.
FSVarStat(AbacusGlobal *glob, STATUS status, double value)
Initializes the status explicitely to Fixed or Set.
FSVarStat(AbacusGlobal *glob)
Initializes the status to Free.
bool contradiction(FSVarStat *fsVarStat) const
Returns whether there is a contradiction.
STATUS status() const
Returns the status of fixing or setting.
double value() const
Returns the value of fixing or setting if the variable has status Fixed or Set.
STATUS status_
The status of the variable.
Exception thrown when an algorithm realizes an internal bug that prevents it from continuing.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
#define OGDF_NEW_DELETE
Makes the class use OGDF's memory allocator.
#define OGDF_THROW_PARAM(CLASS, PARAM)
Replacement for throw.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()