TermCollector.collect_assignments

TermCollector.collect_assignments(input_symbols, result_symbol: MatrixBase | Expr, cse: bool = True)[source]

Collect all assignments needed to compute the result with the given input symbols.

Parameters:
  • input_symbols – given symbols to which no assignments will be made

  • result_symbol – symbol that should be computed

  • cse – perform a common subexpression elimination

Returns:

A code block containing previously collected assignments.