PySCIPOpt  4.3.0
Python Interface for the SCIP Optimization Suite
pyscipopt.expr Namespace Reference

Classes

class  Constant
 
class  Expr
 
class  ExprCons
 
class  GenExpr
 
class  Op
 
class  PowExpr
 
class  ProdExpr
 
class  SumExpr
 
class  Term
 
class  UnaryExpr
 
class  VarExpr
 

Functions

def buildGenExprObj (expr)
 
def cos (expr)
 
def exp (expr)
 
def expr_to_array (expr, nodes)
 
def expr_to_nodes (expr)
 
def log (expr)
 
def quickprod (termlist)
 
def quicksum (termlist)
 
def sin (expr)
 
def sqrt (expr)
 
def value_to_array (val, nodes)
 

Variables

 CONST = Term()
 
 Operator = Op()
 

Function Documentation

◆ buildGenExprObj()

def pyscipopt.expr.buildGenExprObj (   expr)
helper function to generate an object of type GenExpr

Definition at line 116 of file expr.pxi.

◆ cos()

def pyscipopt.expr.cos (   expr)
returns expression with cos-function

Definition at line 635 of file expr.pxi.

References pyscipopt.expr.buildGenExprObj().

◆ exp()

def pyscipopt.expr.exp (   expr)
returns expression with exp-function

Definition at line 623 of file expr.pxi.

References pyscipopt.expr.buildGenExprObj().

◆ expr_to_array()

def pyscipopt.expr.expr_to_array (   expr,
  nodes 
)
adds expression to array

Definition at line 657 of file expr.pxi.

References pyscipopt.expr.value_to_array().

◆ expr_to_nodes()

def pyscipopt.expr.expr_to_nodes (   expr)
transforms tree to an array of nodes. each node is an operator and the position of the 
children of that operator (i.e. the other nodes) in the array

Definition at line 639 of file expr.pxi.

References pyscipopt.expr.expr_to_array().

◆ log()

def pyscipopt.expr.log (   expr)
returns expression with log-function

Definition at line 626 of file expr.pxi.

References pyscipopt.expr.buildGenExprObj().

◆ quickprod()

def pyscipopt.expr.quickprod (   termlist)
multiply linear expressions and constants by avoiding intermediate 
data structures and multiplying terms inplace

Definition at line 366 of file expr.pxi.

◆ quicksum()

def pyscipopt.expr.quicksum (   termlist)
add linear expressions and constants much faster than Python's sum
by avoiding intermediate data structures and adding terms inplace

Definition at line 357 of file expr.pxi.

◆ sin()

def pyscipopt.expr.sin (   expr)
returns expression with sin-function

Definition at line 632 of file expr.pxi.

References pyscipopt.expr.buildGenExprObj().

◆ sqrt()

def pyscipopt.expr.sqrt (   expr)
returns expression with sqrt-function

Definition at line 629 of file expr.pxi.

References pyscipopt.expr.buildGenExprObj().

◆ value_to_array()

def pyscipopt.expr.value_to_array (   val,
  nodes 
)
adds a given value to an array

Definition at line 647 of file expr.pxi.

Variable Documentation

◆ CONST

CONST = Term()

Definition at line 113 of file expr.pxi.

◆ Operator

Operator = Op()

Definition at line 385 of file expr.pxi.