PySCIPOpt  5.1.1
Python Interface for the SCIP Optimization Suite
Expr Class Reference

Public Member Functions

def __abs__ (self)
 
def __add__ (self, other)
 
def __getitem__ (self, key)
 
def __iadd__ (self, other)
 
def __init__ (self, terms=None)
 
def __iter__ (self)
 
def __mul__ (self, other)
 
def __neg__ (self)
 
def __next__ (self)
 
def __pow__ (self, other, modulo)
 
def __radd__ (self, other)
 
def __repr__ (self)
 
def __richcmp__ (self, other, op)
 
def __rmul__ (self, other)
 
def __rsub__ (self, other)
 
def __rtruediv__ (self, other)
 
def __sub__ (self, other)
 
def __truediv__ (self, other)
 
def degree (self)
 
def normalize (self)
 

Public Attributes

 terms
 

Detailed Description

Polynomial expressions of variables with operator overloading.
See also the description in the expr.pxi.

Definition at line 144 of file expr.pxi.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  terms = None 
)
terms is a dict of variables to coefficients.

CONST is used as key for the constant term.

Definition at line 146 of file expr.pxi.

Member Function Documentation

◆ __abs__()

def __abs__ (   self)

Definition at line 167 of file expr.pxi.

References pyscipopt.expr.buildGenExprObj().

◆ __add__()

def __add__ (   self,
  other 
)

Definition at line 170 of file expr.pxi.

References pyscipopt.expr.buildGenExprObj().

◆ __getitem__()

def __getitem__ (   self,
  key 
)

Definition at line 155 of file expr.pxi.

References Expr.terms.

◆ __iadd__()

def __iadd__ (   self,
  other 
)

Definition at line 192 of file expr.pxi.

References pyscipopt.expr.buildGenExprObj(), and Expr.terms.

◆ __iter__()

def __iter__ (   self)

Definition at line 160 of file expr.pxi.

References Expr.terms.

◆ __mul__()

def __mul__ (   self,
  other 
)

Definition at line 208 of file expr.pxi.

References pyscipopt.expr.buildGenExprObj(), and Expr.terms.

◆ __neg__()

def __neg__ (   self)

Definition at line 253 of file expr.pxi.

References Expr.terms.

◆ __next__()

def __next__ (   self)

Definition at line 163 of file expr.pxi.

References Expr.terms.

◆ __pow__()

def __pow__ (   self,
  other,
  modulo 
)

Definition at line 242 of file expr.pxi.

References pyscipopt.expr.buildGenExprObj().

◆ __radd__()

def __radd__ (   self,
  other 
)

Definition at line 259 of file expr.pxi.

References Term.__add__(), and Expr.__add__().

◆ __repr__()

def __repr__ (   self)

Definition at line 276 of file expr.pxi.

References Expr.terms.

◆ __richcmp__()

def __richcmp__ (   self,
  other,
  op 
)
turn it into a constraint

Definition at line 268 of file expr.pxi.

◆ __rmul__()

def __rmul__ (   self,
  other 
)

Definition at line 262 of file expr.pxi.

References Expr.__mul__().

◆ __rsub__()

def __rsub__ (   self,
  other 
)

Definition at line 265 of file expr.pxi.

◆ __rtruediv__()

def __rtruediv__ (   self,
  other 
)
other / self 

Definition at line 234 of file expr.pxi.

References pyscipopt.expr.buildGenExprObj().

◆ __sub__()

def __sub__ (   self,
  other 
)

Definition at line 256 of file expr.pxi.

◆ __truediv__()

def __truediv__ (   self,
  other 
)

Definition at line 227 of file expr.pxi.

References pyscipopt.expr.buildGenExprObj().

◆ degree()

def degree (   self)
computes highest degree of terms

Definition at line 279 of file expr.pxi.

References Expr.terms.

◆ normalize()

def normalize (   self)
remove terms with coefficient of 0

Definition at line 272 of file expr.pxi.

References Expr.terms.

Member Data Documentation

◆ terms

terms

Definition at line 150 of file expr.pxi.


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