cinder.scheduler.evaluator.evaluator module

class EvalAddOp(toks)

Bases: object

eval()
class EvalBoolAndOp(toks)

Bases: object

eval()
class EvalBoolOrOp(toks)

Bases: object

eval()
class EvalCommaSeperator(toks)

Bases: object

eval()
class EvalComparisonOp(toks)

Bases: object

eval()
operations = {'!=': <built-in function ne>, '<': <built-in function lt>, '<=': <built-in function le>, '<>': <built-in function ne>, '==': <built-in function eq>, '>': <built-in function gt>, '>=': <built-in function ge>}
class EvalConstant(toks)

Bases: object

eval()
class EvalFunction(toks)

Bases: object

eval()
functions: dict[str, Callable] = {'abs': <built-in function abs>, 'max': <built-in function max>, 'min': <built-in function min>}
class EvalMultOp(toks)

Bases: object

eval()
class EvalNegateOp(toks)

Bases: object

eval()
class EvalPowerOp(toks)

Bases: object

eval()
class EvalSignOp(toks)

Bases: object

eval()
operations = {'+': 1, '-': -1}
class EvalTernaryOp(toks)

Bases: object

eval()
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.