KNumVar¶
-
class KNumVar : public KPtrArray<KNumVar>¶
Superclass of decision variables
Subclassed by KFloatVar, KIntVar
Public Types
Public Functions
-
KNumVar()¶
Default constructor.
-
KNumVar(KNumVar_I *numVar)¶
Constructor with KNumVar_I.
-
virtual ~KNumVar()¶
Destructor.
-
virtual void instantiate(const double value)¶
Instantiate the variable to value.
-
virtual void setName(const char *name)¶
Set the name of the variable.
-
virtual double getInf() const¶
returns lower bound of this variable
-
virtual double getSup() const¶
returns upper bound of this variable
-
virtual double getValue(void) const¶
returns current instantiation of the variable (when the variable is not instantiated the returned value is undefined)
-
virtual bool getIsInstantiated() const¶
returns true if the variable has been assigned a value, false otherwhise
-
virtual int getDegree() const¶
returns the number of constraints where this variable appears
-
virtual double getTarget() const¶
get target value
-
virtual void setInf(double value)¶
set the lower bound to value
-
virtual void setSup(double value)¶
set the upper bound to value
-
virtual void setTarget(double value)¶
set the target value
-
virtual bool canBeInstantiatedTo(double value)¶
Return true if this variable can be instantiated to ‘value’.
-
virtual void useShaving(bool use)¶
activate shaving Y/N
-
virtual void setHidden(bool hidden)¶
Hidden variable Y/N.
-
virtual bool isHidden(void)¶
Return true iff this variable is hidden.
-
virtual void print(std::ostream &fout) const¶
Pretty printing.
-
virtual void print(void *ctx, PrintFunctionPtr *pfp) const¶
Pretty printing.
-
void printConstraints() const¶
Pretty print its constraints.
-
virtual int instanceof(void) const¶
Return the type of this variable
-
virtual int getIndex() const¶
Return the index of the variable.
-
KNumVar()¶