![]() |
Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
|
Public Member Functions | |
__init__ (self, *args, **kwargs) | |
Init (self) | |
Ok (self) | |
Value (self) | |
Next (self) | |
DebugString (self) | |
__iter__ (self) | |
next (self) | |
__next__ (self) | |
![]() | |
__init__ (self) | |
__str__ (self) | |
__repr__ (self) | |
__disown__ (self) | |
Properties | |
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") | |
![]() | |
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") | |
The class Iterator has two direct subclasses. HoleIterators iterates over all holes, that is value removed between the current min and max of the variable since the last time the variable was processed in the queue. DomainIterators iterates over all elements of the variable domain. Both iterators are not robust to domain changes. Hole iterators can also report values outside the current min and max of the variable. HoleIterators should only be called from a demon attached to the variable that has created this iterator. IntVar* current_var; std::unique_ptr<IntVarIterator> it(current_var->MakeHoleIterator(false)); for (const int64_t hole : InitAndGetValues(it)) { use the hole }
Definition at line 2733 of file pywrapcp.py.
ortools.constraint_solver.pywrapcp.IntVarIterator.__init__ | ( | self, | |
* | args, | ||
** | kwargs ) |
Definition at line 2753 of file pywrapcp.py.
ortools.constraint_solver.pywrapcp.IntVarIterator.__iter__ | ( | self | ) |
Definition at line 2777 of file pywrapcp.py.
ortools.constraint_solver.pywrapcp.IntVarIterator.__next__ | ( | self | ) |
Definition at line 2789 of file pywrapcp.py.
ortools.constraint_solver.pywrapcp.IntVarIterator.DebugString | ( | self | ) |
Pretty Print.
Reimplemented from ortools.constraint_solver.pywrapcp.BaseObject.
Definition at line 2773 of file pywrapcp.py.
ortools.constraint_solver.pywrapcp.IntVarIterator.Init | ( | self | ) |
This method must be called before each loop.
Definition at line 2757 of file pywrapcp.py.
ortools.constraint_solver.pywrapcp.IntVarIterator.Next | ( | self | ) |
This method moves the iterator to the next value.
Definition at line 2769 of file pywrapcp.py.
ortools.constraint_solver.pywrapcp.IntVarIterator.next | ( | self | ) |
Definition at line 2781 of file pywrapcp.py.
ortools.constraint_solver.pywrapcp.IntVarIterator.Ok | ( | self | ) |
This method indicates if we can call Value() or not.
Definition at line 2761 of file pywrapcp.py.
ortools.constraint_solver.pywrapcp.IntVarIterator.Value | ( | self | ) |
This method returns the current value of the iterator.
Definition at line 2765 of file pywrapcp.py.
|
static |
Definition at line 2751 of file pywrapcp.py.