visitor

Classes

EvaluateFixedSubexpressionVisitor([...])

ExpressionReplacementVisitor([substitute, ...])

ExpressionValueVisitor()

SimpleExpressionVisitor()

StreamBasedExpressionVisitor(**kwds)

This class implements a generic stream-based expression walker.

Exceptions

FixedExpressionError(*args, **kwds)

NonConstantExpressionError(*args, **kwds)

RevertToNonrecursive

Functions

clone_expression(expr[, substitute])

A function that is used to clone an expression.

evaluate_expression(exp[, exception, constant])

Evaluate the value of the expression.

evaluate_fixed_subexpressions(expr[, ...])

expression_to_string(expr[, verbose, ...])

Return a string representation of an expression.

get_stack_depth()

identify_components(expr, component_types)

A generator that yields a sequence of nodes in an expression tree that belong to a specified set.

identify_mutable_parameters(expr)

A generator that yields a sequence of mutable parameters in an expression tree.

identify_variables(expr[, include_fixed, ...])

A generator that yields a sequence of variables in an expression tree.

polynomial_degree(node)

Return the polynomial degree of the expression.

replace_expressions(expr, substitution_map)

sizeof_expression(expr)

Return the number of nodes in the expression tree.