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 | |
IntExpr (Solver *const s) | |
virtual | ~IntExpr () |
virtual int64 | Min () const =0 |
virtual void | SetMin (int64 m)=0 |
virtual int64 | Max () const =0 |
virtual void | SetMax (int64 m)=0 |
virtual void | Range (int64 *l, int64 *u) |
By default calls Min() and Max(), but can be redefined when Min and Max code can be factorized. | |
virtual void | SetRange (int64 l, int64 u) |
This method sets both the min and the max of the expression. | |
virtual void | SetValue (int64 v) |
This method sets the value of the expression. | |
virtual bool | Bound () const |
Returns true if the min and the max of the expression are equal. | |
virtual bool | IsVar () const |
Returns true if the expression is indeed a variable. | |
virtual IntVar * | Var ()=0 |
Creates a variable from the expression. | |
IntVar * | VarWithName (const string &name) |
Creates a variable from the expression and set the name of the resulting var. | |
virtual void | WhenRange (Demon *d)=0 |
Attach a demon that will watch the min or the max of the expression. | |
virtual void | Accept (ModelVisitor *const visitor) const |
Accepts the given visitor. |
It Contains the basic protocol for an expression:
Definition at line 3687 of file constraint_solver.h.
operations_research::IntExpr::IntExpr | ( | Solver *const | s | ) | [inline, explicit] |
Definition at line 3689 of file constraint_solver.h.
virtual operations_research::IntExpr::~IntExpr | ( | ) | [inline, virtual] |
Definition at line 3690 of file constraint_solver.h.
virtual int64 operations_research::IntExpr::Min | ( | ) | const [pure virtual] |
virtual void operations_research::IntExpr::SetMin | ( | int64 | m | ) | [pure virtual] |
virtual int64 operations_research::IntExpr::Max | ( | ) | const [pure virtual] |
virtual void operations_research::IntExpr::SetMax | ( | int64 | m | ) | [pure virtual] |
virtual void operations_research::IntExpr::Range | ( | int64 * | l, | |
int64 * | u | |||
) | [inline, virtual] |
By default calls Min() and Max(), but can be redefined when Min and Max code can be factorized.
Definition at line 3699 of file constraint_solver.h.
virtual void operations_research::IntExpr::SetRange | ( | int64 | l, | |
int64 | u | |||
) | [inline, virtual] |
This method sets both the min and the max of the expression.
Definition at line 3704 of file constraint_solver.h.
virtual void operations_research::IntExpr::SetValue | ( | int64 | v | ) | [inline, virtual] |
virtual bool operations_research::IntExpr::Bound | ( | ) | const [inline, virtual] |
Returns true if the min and the max of the expression are equal.
Definition at line 3713 of file constraint_solver.h.
virtual bool operations_research::IntExpr::IsVar | ( | ) | const [inline, virtual] |
Returns true if the expression is indeed a variable.
Reimplemented in operations_research::IntVar.
Definition at line 3716 of file constraint_solver.h.
virtual IntVar* operations_research::IntExpr::Var | ( | ) | [pure virtual] |
Creates a variable from the expression.
Implemented in operations_research::IntVar, and operations_research::BaseIntExpr.
IntVar * operations_research::IntExpr::VarWithName | ( | const string & | name | ) |
Creates a variable from the expression and set the name of the resulting var.
If the expression is already a variable, then it will set the name of the expression, possibly overwriting it. This is just a shortcut to Var() followed by set_name().
Definition at line 46 of file expressions.cc.
virtual void operations_research::IntExpr::WhenRange | ( | Demon * | d | ) | [pure virtual] |
Attach a demon that will watch the min or the max of the expression.
void operations_research::IntExpr::Accept | ( | ModelVisitor *const | visitor | ) | const [virtual] |
Accepts the given visitor.
Class IntExpr.
We no longer need those.
Reimplemented in operations_research::IntVar.
Definition at line 3259 of file constraint_solver.cc.