cinder.scheduler.evaluator.evaluator module¶
- 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 EvalFunction(toks)¶
Bases:
object
- eval()¶
- functions: dict[str, Callable] = {'abs': <built-in function abs>, 'max': <built-in function max>, '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.