![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
The class IntExpr is the base of all integer expressions in constraint programming. It contains the basic protocol for an expression: - setting and modifying its bound - querying if it is bound - listening to events modifying its bounds - casting it into a variable (instance of IntVar)
Definition at line 2590 of file pywrapcp.py.
Public Member Functions | |
| __init__ (self, *args, **kwargs) | |
| Min (self) | |
| SetMin (self, m) | |
| Max (self) | |
| SetMax (self, m) | |
| SetRange (self, l, u) | |
| SetValue (self, v) | |
| Bound (self) | |
| IsVar (self) | |
| Var (self) | |
| VarWithName (self, name) | |
| WhenRange (self, *args) | |
| __repr__ (self) | |
| __str__ (self) | |
| __add__ (self, *args) | |
| __radd__ (self, v) | |
| __sub__ (self, *args) | |
| __rsub__ (self, v) | |
| __mul__ (self, *args) | |
| __rmul__ (self, v) | |
| __floordiv__ (self, *args) | |
| __mod__ (self, *args) | |
| __neg__ (self) | |
| __abs__ (self) | |
| Square (self) | |
| __eq__ (self, *args) | |
| __ne__ (self, *args) | |
| __ge__ (self, *args) | |
| __gt__ (self, *args) | |
| __le__ (self, *args) | |
| __lt__ (self, *args) | |
| MapTo (self, vars) | |
| IndexOf (self, *args) | |
| IsMember (self, values) | |
| Member (self, values) | |
| NotMember (self, starts, ends) | |
| Public Member Functions inherited from ortools.constraint_solver.pywrapcp.PropagationBaseObject | |
| __init__ (self, s) | |
| DebugString (self) | |
| solver (self) | |
| Name (self) | |
| __disown__ (self) | |
| Public Member Functions inherited from ortools.constraint_solver.pywrapcp.BaseObject | |
| __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") | |
| Properties inherited from ortools.constraint_solver.pywrapcp.PropagationBaseObject | |
| thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") | |
| Properties inherited from ortools.constraint_solver.pywrapcp.BaseObject | |
| thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") | |
| ortools.constraint_solver.pywrapcp.IntExpr.__init__ | ( | self, | |
| * | args, | ||
| ** | kwargs ) |
Definition at line 2603 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.__abs__ | ( | self | ) |
Definition at line 2692 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.__add__ | ( | self, | |
| * | args ) |
Definition at line 2665 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.__eq__ | ( | self, | |
| * | args ) |
Definition at line 2698 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.__floordiv__ | ( | self, | |
| * | args ) |
Definition at line 2683 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.__ge__ | ( | self, | |
| * | args ) |
Definition at line 2704 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.__gt__ | ( | self, | |
| * | args ) |
Definition at line 2707 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.__le__ | ( | self, | |
| * | args ) |
Definition at line 2710 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.__lt__ | ( | self, | |
| * | args ) |
Definition at line 2713 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.__mod__ | ( | self, | |
| * | args ) |
Definition at line 2686 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.__mul__ | ( | self, | |
| * | args ) |
Definition at line 2677 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.__ne__ | ( | self, | |
| * | args ) |
Definition at line 2701 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.__neg__ | ( | self | ) |
Definition at line 2689 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.__radd__ | ( | self, | |
| v ) |
Definition at line 2668 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.__repr__ | ( | self | ) |
Definition at line 2659 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.__rmul__ | ( | self, | |
| v ) |
Definition at line 2680 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.__rsub__ | ( | self, | |
| v ) |
Definition at line 2674 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.__str__ | ( | self | ) |
Definition at line 2662 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.__sub__ | ( | self, | |
| * | args ) |
Definition at line 2671 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.Bound | ( | self | ) |
Returns true if the min and the max of the expression are equal.
Reimplemented in ortools.constraint_solver.pywrapcp.BooleanVar.
Definition at line 2626 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.IndexOf | ( | self, | |
| * | args ) |
Definition at line 2719 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.IsMember | ( | self, | |
| values ) |
Definition at line 2722 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.IsVar | ( | self | ) |
Returns true if the expression is indeed a variable.
Reimplemented in ortools.constraint_solver.pywrapcp.IntVar.
Definition at line 2630 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.MapTo | ( | self, | |
| vars ) |
Definition at line 2716 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.Max | ( | self | ) |
Reimplemented in ortools.constraint_solver.pywrapcp.BooleanVar.
Definition at line 2612 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.Member | ( | self, | |
| values ) |
Definition at line 2725 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.Min | ( | self | ) |
Reimplemented in ortools.constraint_solver.pywrapcp.BooleanVar.
Definition at line 2606 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.NotMember | ( | self, | |
| starts, | |||
| ends ) |
Definition at line 2728 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.SetMax | ( | self, | |
| m ) |
Reimplemented in ortools.constraint_solver.pywrapcp.BooleanVar.
Definition at line 2615 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.SetMin | ( | self, | |
| m ) |
Reimplemented in ortools.constraint_solver.pywrapcp.BooleanVar.
Definition at line 2609 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.SetRange | ( | self, | |
| l, | |||
| u ) |
This method sets both the min and the max of the expression.
Reimplemented in ortools.constraint_solver.pywrapcp.BooleanVar.
Definition at line 2618 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.SetValue | ( | self, | |
| v ) |
This method sets the value of the expression.
Definition at line 2622 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.Square | ( | self | ) |
Definition at line 2695 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.Var | ( | self | ) |
Creates a variable from the expression.
Reimplemented in ortools.constraint_solver.pywrapcp.IntVar.
Definition at line 2634 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.VarWithName | ( | self, | |
| 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 2638 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntExpr.WhenRange | ( | self, | |
| * | args ) |
*Overload 1:* Attach a demon that will watch the min or the max of the expression. | *Overload 2:* Attach a demon that will watch the min or the max of the expression.
Reimplemented in ortools.constraint_solver.pywrapcp.BooleanVar.
Definition at line 2647 of file pywrapcp.py.
|
static |
Definition at line 2601 of file pywrapcp.py.