Generated on: Thu Mar 29 07:46:58 PDT 2012 for custom file set | ||
|
||
// doxy/ or-tools/ src/ constraint_solver/ |
#include <constraint_solver.h>
Public Member Functions | |
IntVar (Solver *const s) | |
IntVar. | |
IntVar (Solver *const s, const string &name) | |
virtual | ~IntVar () |
virtual bool | IsVar () const |
Returns true if the expression is indeed a variable. | |
virtual IntVar * | Var () |
Creates a variable from the expression. | |
virtual int64 | Value () const =0 |
This method returns the value of the variable. | |
virtual void | RemoveValue (int64 v)=0 |
This method removes the value 'v' from the domain of the variable. | |
virtual void | RemoveInterval (int64 l, int64 u)=0 |
This method removes the interval 'l' . | |
virtual void | RemoveValues (const int64 *const values, int size) |
This method remove the values from the domain of the variable. | |
void | RemoveValues (const std::vector< int64 > &values) |
This method remove the values from the domain of the variable. | |
virtual void | SetValues (const int64 *const values, int size) |
This method intersects the current domain with the values in the array. | |
void | SetValues (const std::vector< int64 > &values) |
This method intersects the current domain with the values in the array. | |
virtual void | WhenBound (Demon *d)=0 |
This method attaches a demon that will be awakened when the variable is bound. | |
virtual void | WhenDomain (Demon *d)=0 |
This method attaches a demon that will watch any domain modification of the domain of the variable. | |
virtual uint64 | Size () const =0 |
This method returns the number of values in the domain of the variable. | |
virtual bool | Contains (int64 v) const =0 |
This method returns whether the value 'v' is in the domain of the variable. | |
virtual IntVarIterator * | MakeHoleIterator (bool reversible) const =0 |
Creates a hole iterator. | |
virtual IntVarIterator * | MakeDomainIterator (bool reversible) const =0 |
Creates a domain iterator. | |
virtual int64 | OldMin () const =0 |
Returns the previous min. | |
virtual int64 | OldMax () const =0 |
Returns the previous max. | |
virtual int | VarType () const |
IntVar. | |
virtual void | Accept (ModelVisitor *const visitor) const |
Accepts the given visitor. |
In addition to the IntExpr protocol, it offers persistance, removing values from the domains and a finer model for events
Definition at line 3780 of file constraint_solver.h.
operations_research::IntVar::IntVar | ( | Solver *const | s | ) | [explicit] |
operations_research::IntVar::IntVar | ( | Solver *const | s, | |
const string & | name | |||
) |
Definition at line 56 of file expressions.cc.
virtual operations_research::IntVar::~IntVar | ( | ) | [inline, virtual] |
Definition at line 3784 of file constraint_solver.h.
virtual bool operations_research::IntVar::IsVar | ( | ) | const [inline, virtual] |
Returns true if the expression is indeed a variable.
Reimplemented from operations_research::IntExpr.
Definition at line 3786 of file constraint_solver.h.
virtual IntVar* operations_research::IntVar::Var | ( | ) | [inline, virtual] |
Creates a variable from the expression.
Implements operations_research::IntExpr.
Definition at line 3787 of file constraint_solver.h.
virtual int64 operations_research::IntVar::Value | ( | ) | const [pure virtual] |
This method returns the value of the variable.
This method checks before that the variable is bound.
virtual void operations_research::IntVar::RemoveValue | ( | int64 | v | ) | [pure virtual] |
This method removes the value 'v' from the domain of the variable.
virtual void operations_research::IntVar::RemoveInterval | ( | int64 | l, | |
int64 | u | |||
) | [pure virtual] |
This method removes the interval 'l' .
. 'u' from the domain of the variable. It assumes that 'l' <= 'u'.
void operations_research::IntVar::RemoveValues | ( | const int64 *const | values, | |
int | size | |||
) | [virtual] |
This method remove the values from the domain of the variable.
Definition at line 4958 of file expressions.cc.
void operations_research::IntVar::RemoveValues | ( | const std::vector< int64 > & | values | ) | [inline] |
This method remove the values from the domain of the variable.
Definition at line 3804 of file constraint_solver.h.
void operations_research::IntVar::SetValues | ( | const int64 *const | values, | |
int | size | |||
) | [virtual] |
This method intersects the current domain with the values in the array.
Definition at line 4975 of file expressions.cc.
void operations_research::IntVar::SetValues | ( | const std::vector< int64 > & | values | ) | [inline] |
This method intersects the current domain with the values in the array.
Definition at line 3812 of file constraint_solver.h.
virtual void operations_research::IntVar::WhenBound | ( | Demon * | d | ) | [pure virtual] |
This method attaches a demon that will be awakened when the variable is bound.
virtual void operations_research::IntVar::WhenDomain | ( | Demon * | d | ) | [pure virtual] |
This method attaches a demon that will watch any domain modification of the domain of the variable.
virtual uint64 operations_research::IntVar::Size | ( | ) | const [pure virtual] |
This method returns the number of values in the domain of the variable.
virtual bool operations_research::IntVar::Contains | ( | int64 | v | ) | const [pure virtual] |
This method returns whether the value 'v' is in the domain of the variable.
virtual IntVarIterator* operations_research::IntVar::MakeHoleIterator | ( | bool | reversible | ) | const [pure virtual] |
Creates a hole iterator.
The object is created on the normal C++ heap and the solver does NOT take ownership of the object.
virtual IntVarIterator* operations_research::IntVar::MakeDomainIterator | ( | bool | reversible | ) | const [pure virtual] |
Creates a domain iterator.
The object is created on the normal C++ heap and the solver does NOT take ownership of the object.
virtual int64 operations_research::IntVar::OldMin | ( | ) | const [pure virtual] |
Returns the previous min.
virtual int64 operations_research::IntVar::OldMax | ( | ) | const [pure virtual] |
Returns the previous max.
int operations_research::IntVar::VarType | ( | ) | const [virtual] |
void operations_research::IntVar::Accept | ( | ModelVisitor *const | visitor | ) | const [virtual] |
Accepts the given visitor.
Reimplemented from operations_research::IntExpr.
Definition at line 4965 of file expressions.cc.