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_) { }
145 double value()
const {
return value_; }
151 void value(
double val) { value_ = val; }
161 return (status_ != Free);
176 bool contradiction(
FSVarStat *fsVarStat)
const;
187 bool contradiction(
STATUS status,
double value = 0)
const;
Global data and functions.
Base class of all other classes of ABACUS.
FSVarStat(AbacusGlobal *glob, STATUS status, double value)
Initializes the status explicitely to Fixed or Set.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
The variable is fixed to its lower bound.
The variable is set to a value which can be accessed with the member function value().
Status of fixed and set variables.
void status(const FSVarStat *stat)
Assigns the status as in stat.
STATUS
The enumeration defining the different statuses of variables from the point of view of fixing and set...
STATUS status_
The status of the variable.
STATUS status() const
Returns the status of fixing or setting.
FSVarStat(AbacusGlobal *glob, STATUS status)
Initializes the status to status.
bool fixedOrSet() const
Returns false if the status is Free, true otherwise.
static std::ostream & ifout()
stream for forced output (global; used by internal libraries, e.g. Abacus)
#define OGDF_THROW_PARAM(CLASS, PARAM)
Replacement for throw.
double value_
The value the variable is fixed/set to.
Exception thrown when an algorithm realizes an internal bug that prevents it from continuing...
The variable is fixed to a value which can be accessed with the member function value().
double value() const
Returns the value of fixing or setting if the variable has status Fixed or Set.
FSVarStat(AbacusGlobal *glob)
Initializes the status to Free.
#define OGDF_NEW_DELETE
Makes the class use OGDF's memory allocator.
The variable is neither fixed nor set.
The variable is set to its lower bound.
void status(STATUS stat)
Assigns a new status.
void value(double val)
Assigns a new value of fixing or setting.
ostream & operator<<(ostream &out, const Active< BaseType, CoType > &rhs)
AbacusGlobal * glob_
A pointer to the corresponding global object.
void status(STATUS stat, double val)
Assigns a new status also for the statuses Fixed and Set.
FSVarStat(FSVarStat *fsVarStat)
Initializes the status as in fsVarStat.
The variable is set to its upper bound.