The cinder.scheduler.evaluator.evaluator
Module¶
-
class
EvalComparisonOp
(toks)¶ Bases:
object
-
eval
()¶
-
operations
= {'>=': <built-in function ge>, '==': <built-in function eq>, '<=': <built-in function le>, '<>': <built-in function ne>, '!=': <built-in function ne>, '<': <built-in function lt>, '>': <built-in function gt>}¶
-
-
class
EvalFunction
(toks)¶ Bases:
object
-
eval
()¶
-
functions
= {'max': <built-in function max>, 'abs': <built-in function abs>, 'min': <built-in function min>}¶
-
-
evaluate
(expression, **kwargs)¶ Evaluates an expression.
Provides the facility to evaluate mathematical expressions, and to substitute variables from dictionaries into those expressions.
Supports both integer and floating point values, and automatic promotion where necessary.