![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
Definition at line 3320 of file constraint_solveri.h.
#include <constraint_solveri.h>
Public Member Functions | |
| BooleanVar (Solver *const s, const std::string &name="") | |
| ~BooleanVar () override | |
| int64_t | Min () const override |
| void | SetMin (int64_t m) override |
| int64_t | Max () const override |
| void | SetMax (int64_t m) override |
| void | SetRange (int64_t mi, int64_t ma) override |
| This method sets both the min and the max of the expression. | |
| bool | Bound () const override |
| Returns true if the min and the max of the expression are equal. | |
| int64_t | Value () const override |
| void | RemoveValue (int64_t v) override |
| This method removes the value 'v' from the domain of the variable. | |
| void | RemoveInterval (int64_t l, int64_t u) override |
| void | WhenBound (Demon *d) override |
| void | WhenRange (Demon *d) override |
| Attach a demon that will watch the min or the max of the expression. | |
| void | WhenDomain (Demon *d) override |
| uint64_t | Size () const override |
| This method returns the number of values in the domain of the variable. | |
| bool | Contains (int64_t v) const override |
| IntVarIterator * | MakeHoleIterator (bool reversible) const override |
| --— Misc --— | |
| IntVarIterator * | MakeDomainIterator (bool reversible) const override |
| std::string | DebugString () const override |
| int | VarType () const override |
| ------— IntVar ------— | |
| IntVar * | IsEqual (int64_t constant) override |
| IsEqual. | |
| IntVar * | IsDifferent (int64_t constant) override |
| IntVar * | IsGreaterOrEqual (int64_t constant) override |
| IntVar * | IsLessOrEqual (int64_t constant) override |
| virtual void | RestoreValue ()=0 |
| std::string | BaseName () const override |
| Returns a base name for automatic naming. | |
| int | RawValue () const |
| Public Member Functions inherited from operations_research::IntVar | |
| IntVar (Solver *s) | |
| -------— IntVar -------— | |
| IntVar (Solver *s, const std::string &name) | |
| IntVar (const IntVar &)=delete | |
| This type is neither copyable nor movable. | |
| IntVar & | operator= (const IntVar &)=delete |
| ~IntVar () override | |
| bool | IsVar () const override |
| Returns true if the expression is indeed a variable. | |
| IntVar * | Var () override |
| Creates a variable from the expression. | |
| virtual void | RemoveValues (const std::vector< int64_t > &values) |
| This method remove the values from the domain of the variable. | |
| virtual void | SetValues (const std::vector< int64_t > &values) |
| This method intersects the current domain with the values in the array. | |
| void | WhenBound (Solver::Closure closure) |
| void | WhenBound (Solver::Action action) |
| void | WhenDomain (Solver::Closure closure) |
| void | WhenDomain (Solver::Action action) |
| virtual int64_t | OldMin () const =0 |
| Returns the previous min. | |
| virtual int64_t | OldMax () const =0 |
| Returns the previous max. | |
| void | Accept (ModelVisitor *visitor) const override |
| Accepts the given visitor. | |
| int | index () const |
| Returns the index of the variable. | |
| Public Member Functions inherited from operations_research::IntExpr | |
| IntExpr (Solver *const s) | |
| IntExpr (const IntExpr &)=delete | |
| This type is neither copyable nor movable. | |
| IntExpr & | operator= (const IntExpr &)=delete |
| ~IntExpr () override | |
| virtual void | Range (int64_t *l, int64_t *u) |
| virtual void | SetValue (int64_t v) |
| This method sets the value of the expression. | |
| IntVar * | VarWithName (const std::string &name) |
| -------— IntExpr -------— | |
| void | WhenRange (Solver::Closure closure) |
| Attach a demon that will watch the min or the max of the expression. | |
| void | WhenRange (Solver::Action action) |
| Attach a demon that will watch the min or the max of the expression. | |
| Public Member Functions inherited from operations_research::PropagationBaseObject | |
| PropagationBaseObject (Solver *const s) | |
| PropagationBaseObject (const PropagationBaseObject &)=delete | |
| This type is neither copyable nor movable. | |
| PropagationBaseObject & | operator= (const PropagationBaseObject &)=delete |
| ~PropagationBaseObject () override | |
| std::string | DebugString () const override |
| Solver * | solver () const |
| void | FreezeQueue () |
| void | UnfreezeQueue () |
| void | EnqueueDelayedDemon (Demon *const d) |
| void | EnqueueVar (Demon *const d) |
| void | ExecuteAll (const SimpleRevFIFO< Demon * > &demons) |
| void | EnqueueAll (const SimpleRevFIFO< Demon * > &demons) |
| void | set_action_on_fail (Solver::Action a) |
| void | reset_action_on_fail () |
| This method clears the failure callback. | |
| void | set_variable_to_clean_on_fail (IntVar *v) |
| Shortcut for variable cleaner. | |
| virtual std::string | name () const |
| Object naming. | |
| void | set_name (absl::string_view name) |
| bool | HasName () const |
| Returns whether the object has been named or not. | |
| Public Member Functions inherited from operations_research::BaseObject | |
| BaseObject () | |
| BaseObject (const BaseObject &)=delete | |
| This type is neither copyable nor movable. | |
| BaseObject & | operator= (const BaseObject &)=delete |
| virtual | ~BaseObject ()=default |
Static Public Attributes | |
| static const int | kUnboundBooleanVarValue = 2 |
| --— Boolean variable --— | |
Protected Attributes | |
| int | value_ |
| SimpleRevFIFO< Demon * > | bound_demons_ |
| SimpleRevFIFO< Demon * > | delayed_bound_demons_ |
|
inlineexplicit |
Definition at line 3324 of file constraint_solveri.h.
|
inlineoverride |
Definition at line 3327 of file constraint_solveri.h.
|
inlineoverridevirtual |
Returns a base name for automatic naming.
Reimplemented from operations_research::PropagationBaseObject.
Definition at line 3357 of file constraint_solveri.h.
|
inlineoverridevirtual |
Returns true if the min and the max of the expression are equal.
Reimplemented from operations_research::IntExpr.
Definition at line 3334 of file constraint_solveri.h.
|
overridevirtual |
This method returns whether the value 'v' is in the domain of the variable.
Implements operations_research::IntVar.
Definition at line 130 of file expressions.cc.
|
overridevirtual |
Reimplemented from operations_research::BaseObject.
Definition at line 176 of file expressions.cc.
|
overridevirtual |
Implements operations_research::IntVar.
Definition at line 145 of file expressions.cc.
|
overridevirtual |
|
overridevirtual |
Implements operations_research::IntVar.
Definition at line 156 of file expressions.cc.
|
overridevirtual |
Implements operations_research::IntVar.
Definition at line 166 of file expressions.cc.
|
overridevirtual |
Creates a domain iterator. When 'reversible' is false, the returned object is created on the normal C++ heap and the solver does NOT take ownership of the object.
Implements operations_research::IntVar.
Definition at line 6382 of file expressions.cc.
|
overridevirtual |
--— Misc --—
Implements operations_research::IntVar.
Definition at line 6379 of file expressions.cc.
|
inlineoverridevirtual |
Implements operations_research::IntExpr.
Definition at line 3331 of file constraint_solveri.h.
|
inlineoverridevirtual |
Implements operations_research::IntExpr.
Definition at line 3329 of file constraint_solveri.h.
|
inline |
Definition at line 3359 of file constraint_solveri.h.
|
overridevirtual |
This method removes the interval 'l' .. 'u' from the domain of the variable. It assumes that 'l' <= 'u'.
Implements operations_research::IntVar.
Definition at line 105 of file expressions.cc.
|
overridevirtual |
This method removes the value 'v' from the domain of the variable.
Implements operations_research::IntVar.
Definition at line 93 of file expressions.cc.
|
pure virtual |
|
overridevirtual |
Implements operations_research::IntExpr.
Definition at line 76 of file expressions.cc.
|
overridevirtual |
Implements operations_research::IntExpr.
Definition at line 70 of file expressions.cc.
|
overridevirtual |
This method sets both the min and the max of the expression.
Reimplemented from operations_research::IntExpr.
Definition at line 82 of file expressions.cc.
|
overridevirtual |
This method returns the number of values in the domain of the variable.
Implements operations_research::IntVar.
Definition at line 126 of file expressions.cc.
|
inlineoverridevirtual |
This method returns the value of the variable. This method checks before that the variable is bound.
Implements operations_research::IntVar.
Definition at line 3335 of file constraint_solveri.h.
|
inlineoverridevirtual |
------— IntVar ------—
Reimplemented from operations_research::IntVar.
Definition at line 3349 of file constraint_solveri.h.
|
overridevirtual |
This method attaches a demon that will be awakened when the variable is bound.
Implements operations_research::IntVar.
Definition at line 116 of file expressions.cc.
|
inlineoverridevirtual |
This method attaches a demon that will watch any domain modification of the domain of the variable.
Implements operations_research::IntVar.
Definition at line 3343 of file constraint_solveri.h.
|
inlineoverridevirtual |
Attach a demon that will watch the min or the max of the expression.
Implements operations_research::IntExpr.
Definition at line 3342 of file constraint_solveri.h.
|
protected |
Definition at line 3363 of file constraint_solveri.h.
|
protected |
Definition at line 3364 of file constraint_solveri.h.
|
static |
--— Boolean variable --—
Definition at line 3322 of file constraint_solveri.h.
|
protected |
Definition at line 3362 of file constraint_solveri.h.