finesse.symbols.Symbol

Overview

class finesse.symbols.Symbol[source]

Bases: ABC

Properties

Symbol.imag

Symbol.is_changing

Returns True if one of the arguements of this symbolic object is varying whilst a :class:`` is running.

Symbol.real

Symbol.value

The current value of this symbol

Methods

Symbol.all(predicate[, memo])

Returns all the symbols that are present in this expression which satisify the predicate.

Symbol.changing_parameters()

Symbol.collect()

Collects like terms in the expressions.

Symbol.expand()

Performs a basic expansion of the symbolic expression.

Symbol.expand_symbols()

A method that expands any symbolic parameter references that are themselves symbolic.

Symbol.lambdify(*args[, expand_symbols, ...])

Converts this symbolic expression into a function that can be called.

Symbol.parameters([memo])

Returns all the parameters that are present in this symbolic expression.

Symbol.substitute(mapping)

Uses a dictionary to substitute terms in this expression with another.

Symbol.sympy_simplify()

Converts this expression into a Sympy symbol.

Symbol.to_binary_add_mul()

Converts a symbolic expression to use binary forms of operator.add and operator.mul operators, rather than the n-ary operator_add and operator_mul.

Symbol.to_nary_add_mul()

Converts a symbolic expression to use n-ary forms of operator_add and operator_mul operators, rather than the binary-ary operator.add and operator.mul.

Symbol.to_sympy()

Converts a Finesse symbolic expression into a Sympy expression.