Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
ortools.constraint_solver.pywrapcp.IntExpr Class Reference
Inheritance diagram for ortools.constraint_solver.pywrapcp.IntExpr:
ortools.constraint_solver.pywrapcp.PropagationBaseObject ortools.constraint_solver.pywrapcp.BaseObject ortools.constraint_solver.pywrapcp.IntVar ortools.constraint_solver.pywrapcp.BooleanVar

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")
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ __init__()

ortools.constraint_solver.pywrapcp.IntExpr.__init__ ( self,
* args,
** kwargs )

Definition at line 2603 of file pywrapcp.py.

Member Function Documentation

◆ __abs__()

ortools.constraint_solver.pywrapcp.IntExpr.__abs__ ( self)

Definition at line 2692 of file pywrapcp.py.

◆ __add__()

ortools.constraint_solver.pywrapcp.IntExpr.__add__ ( self,
* args )

Definition at line 2665 of file pywrapcp.py.

◆ __eq__()

ortools.constraint_solver.pywrapcp.IntExpr.__eq__ ( self,
* args )

Definition at line 2698 of file pywrapcp.py.

◆ __floordiv__()

ortools.constraint_solver.pywrapcp.IntExpr.__floordiv__ ( self,
* args )

Definition at line 2683 of file pywrapcp.py.

◆ __ge__()

ortools.constraint_solver.pywrapcp.IntExpr.__ge__ ( self,
* args )

Definition at line 2704 of file pywrapcp.py.

◆ __gt__()

ortools.constraint_solver.pywrapcp.IntExpr.__gt__ ( self,
* args )

Definition at line 2707 of file pywrapcp.py.

◆ __le__()

ortools.constraint_solver.pywrapcp.IntExpr.__le__ ( self,
* args )

Definition at line 2710 of file pywrapcp.py.

◆ __lt__()

ortools.constraint_solver.pywrapcp.IntExpr.__lt__ ( self,
* args )

Definition at line 2713 of file pywrapcp.py.

◆ __mod__()

ortools.constraint_solver.pywrapcp.IntExpr.__mod__ ( self,
* args )

Definition at line 2686 of file pywrapcp.py.

◆ __mul__()

ortools.constraint_solver.pywrapcp.IntExpr.__mul__ ( self,
* args )

Definition at line 2677 of file pywrapcp.py.

◆ __ne__()

ortools.constraint_solver.pywrapcp.IntExpr.__ne__ ( self,
* args )

Definition at line 2701 of file pywrapcp.py.

◆ __neg__()

ortools.constraint_solver.pywrapcp.IntExpr.__neg__ ( self)

Definition at line 2689 of file pywrapcp.py.

◆ __radd__()

ortools.constraint_solver.pywrapcp.IntExpr.__radd__ ( self,
v )

Definition at line 2668 of file pywrapcp.py.

◆ __repr__()

ortools.constraint_solver.pywrapcp.IntExpr.__repr__ ( self)

Definition at line 2659 of file pywrapcp.py.

◆ __rmul__()

ortools.constraint_solver.pywrapcp.IntExpr.__rmul__ ( self,
v )

Definition at line 2680 of file pywrapcp.py.

◆ __rsub__()

ortools.constraint_solver.pywrapcp.IntExpr.__rsub__ ( self,
v )

Definition at line 2674 of file pywrapcp.py.

◆ __str__()

ortools.constraint_solver.pywrapcp.IntExpr.__str__ ( self)

Definition at line 2662 of file pywrapcp.py.

◆ __sub__()

ortools.constraint_solver.pywrapcp.IntExpr.__sub__ ( self,
* args )

Definition at line 2671 of file pywrapcp.py.

◆ Bound()

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.

◆ IndexOf()

ortools.constraint_solver.pywrapcp.IntExpr.IndexOf ( self,
* args )

Definition at line 2719 of file pywrapcp.py.

◆ IsMember()

ortools.constraint_solver.pywrapcp.IntExpr.IsMember ( self,
values )

Definition at line 2722 of file pywrapcp.py.

◆ IsVar()

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.

◆ MapTo()

ortools.constraint_solver.pywrapcp.IntExpr.MapTo ( self,
vars )

Definition at line 2716 of file pywrapcp.py.

◆ Max()

ortools.constraint_solver.pywrapcp.IntExpr.Max ( self)

Reimplemented in ortools.constraint_solver.pywrapcp.BooleanVar.

Definition at line 2612 of file pywrapcp.py.

◆ Member()

ortools.constraint_solver.pywrapcp.IntExpr.Member ( self,
values )

Definition at line 2725 of file pywrapcp.py.

◆ Min()

ortools.constraint_solver.pywrapcp.IntExpr.Min ( self)

Reimplemented in ortools.constraint_solver.pywrapcp.BooleanVar.

Definition at line 2606 of file pywrapcp.py.

◆ NotMember()

ortools.constraint_solver.pywrapcp.IntExpr.NotMember ( self,
starts,
ends )

Definition at line 2728 of file pywrapcp.py.

◆ SetMax()

ortools.constraint_solver.pywrapcp.IntExpr.SetMax ( self,
m )

Reimplemented in ortools.constraint_solver.pywrapcp.BooleanVar.

Definition at line 2615 of file pywrapcp.py.

◆ SetMin()

ortools.constraint_solver.pywrapcp.IntExpr.SetMin ( self,
m )

Reimplemented in ortools.constraint_solver.pywrapcp.BooleanVar.

Definition at line 2609 of file pywrapcp.py.

◆ SetRange()

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.

◆ SetValue()

ortools.constraint_solver.pywrapcp.IntExpr.SetValue ( self,
v )
This method sets the value of the expression.

Definition at line 2622 of file pywrapcp.py.

◆ Square()

ortools.constraint_solver.pywrapcp.IntExpr.Square ( self)

Definition at line 2695 of file pywrapcp.py.

◆ Var()

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.

◆ VarWithName()

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.

◆ WhenRange()

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.

Property Documentation

◆ thisown

ortools.constraint_solver.pywrapcp.IntExpr.thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
static

Definition at line 2601 of file pywrapcp.py.


The documentation for this class was generated from the following file: