Google OR-Tools v9.11
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
 DebugString (self)
 
 solver (self)
 
 Name (self)
 
 __disown__ (self)
 
- Public Member Functions inherited from ortools.constraint_solver.pywrapcp.BaseObject

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 2356 of file pywrapcp.py.

Constructor & Destructor Documentation

◆ __init__()

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

Member Function Documentation

◆ __abs__()

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

Definition at line 2458 of file pywrapcp.py.

◆ __add__()

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

Definition at line 2431 of file pywrapcp.py.

◆ __eq__()

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

Definition at line 2464 of file pywrapcp.py.

◆ __floordiv__()

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

Definition at line 2449 of file pywrapcp.py.

◆ __ge__()

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

Definition at line 2470 of file pywrapcp.py.

◆ __gt__()

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

Definition at line 2473 of file pywrapcp.py.

◆ __le__()

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

Definition at line 2476 of file pywrapcp.py.

◆ __lt__()

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

Definition at line 2479 of file pywrapcp.py.

◆ __mod__()

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

Definition at line 2452 of file pywrapcp.py.

◆ __mul__()

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

Definition at line 2443 of file pywrapcp.py.

◆ __ne__()

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

Definition at line 2467 of file pywrapcp.py.

◆ __neg__()

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

Definition at line 2455 of file pywrapcp.py.

◆ __radd__()

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

Definition at line 2434 of file pywrapcp.py.

◆ __repr__()

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

◆ __rmul__()

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

Definition at line 2446 of file pywrapcp.py.

◆ __rsub__()

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

Definition at line 2440 of file pywrapcp.py.

◆ __str__()

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

Reimplemented from ortools.constraint_solver.pywrapcp.BaseObject.

Reimplemented in ortools.constraint_solver.pywrapcp.IntVar.

Definition at line 2428 of file pywrapcp.py.

◆ __sub__()

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

Definition at line 2437 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 2392 of file pywrapcp.py.

◆ IndexOf()

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

Definition at line 2485 of file pywrapcp.py.

◆ IsMember()

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

Definition at line 2488 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 2396 of file pywrapcp.py.

◆ MapTo()

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

Definition at line 2482 of file pywrapcp.py.

◆ Max()

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

Reimplemented in ortools.constraint_solver.pywrapcp.BooleanVar.

Definition at line 2378 of file pywrapcp.py.

◆ Member()

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

Definition at line 2491 of file pywrapcp.py.

◆ Min()

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

Reimplemented in ortools.constraint_solver.pywrapcp.BooleanVar.

Definition at line 2372 of file pywrapcp.py.

◆ NotMember()

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

Definition at line 2494 of file pywrapcp.py.

◆ SetMax()

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

Reimplemented in ortools.constraint_solver.pywrapcp.BooleanVar.

Definition at line 2381 of file pywrapcp.py.

◆ SetMin()

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

Reimplemented in ortools.constraint_solver.pywrapcp.BooleanVar.

Definition at line 2375 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 2384 of file pywrapcp.py.

◆ SetValue()

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

Definition at line 2388 of file pywrapcp.py.

◆ Square()

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

Definition at line 2461 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 2400 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 2404 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 2413 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 2367 of file pywrapcp.py.


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