Class TfcPrinter#
Defined in File CeSolver.py
Inheritance Relationships#
Base Type#
public PythonCodePrinter
Class Documentation#
- tfc.utils.CeSolver.TfcPrinter : public PythonCodePrinter
Public Functions
- __init__(self, settings=None)#
Protected Functions
- _hprint_Pow(self, Expr expr, bool rational=False, str sqrt="np.sqrt")#
Override _hprint_Pow to use np.sqrt rather than math.sqrt Parameters ---------- expr : Expr Expression to print. rational : bool Whether the expression is rational. sqrt : str String to print for the sqrt. Returns ------- str String to print.
- _print_Symbol(self, Expr expr)#
Add in Symbol printing function. Parameters ---------- expr : Expr Symbol to print. Returns ------- str String to print.
- _print_Function(self, Expr expr)#
Add in Function printing function. Parameters ---------- expr : Expr Function to print. Returns ------- str String to print.
- _print_Subs(self, Expr subs)#
Substitute values. Parameters ---------- subs : Expr Substitution(s). Returns ------- str String to print.
- _print_Derivative(self, Expr expr)#
Add in derivative printing function that uses egrad. Parameters ---------- expr : Expr Expression to print. Returns ------- str String to print.