class Expr:
Represents a Fortran expression as a op-data pair.
Expr instances are hashable and sortable.
Static Method | parse |
Parse a Fortran expression to a Expr. |
Method | __add__ |
Undocumented |
Method | __call__ |
Undocumented |
Method | __eq__ |
Undocumented |
Method | __floordiv__ |
Undocumented |
Method | __ge__ |
Undocumented |
Method | __getitem__ |
Undocumented |
Method | __gt__ |
Undocumented |
Method | __hash__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | __le__ |
Undocumented |
Method | __lt__ |
Undocumented |
Method | __mul__ |
Undocumented |
Method | __neg__ |
Undocumented |
Method | __pos__ |
Undocumented |
Method | __pow__ |
Undocumented |
Method | __radd__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | __rfloordiv__ |
Undocumented |
Method | __rmul__ |
Undocumented |
Method | __rsub__ |
Undocumented |
Method | __rtruediv__ |
Undocumented |
Method | __str__ |
Undocumented |
Method | __sub__ |
Undocumented |
Method | __truediv__ |
Undocumented |
Method | contains |
Check if self contains other. |
Method | linear​_solve |
Return a, b such that a * symbol + b == self. |
Method | polynomial​_atoms |
Return a set of expressions used as atoms in polynomial self. |
Method | substitute |
Recursively substitute symbols with values in symbols map. |
Method | symbols |
Return a set of symbols contained in self. |
Method | tostring |
Return a string representation of Expr. |
Method | traverse |
Traverse expression tree with visit function. |
Instance Variable | data |
Undocumented |
Instance Variable | op |
Undocumented |
Return a, b such that a * symbol + b == self.
If self is not linear with respect to symbol, raise RuntimeError.
Recursively substitute symbols with values in symbols map.
Symbols map is a dictionary of symbol-expression pairs.
Traverse expression tree with visit function.
The visit function is applied to an expression with given args and kwargs.
Traverse call returns an expression returned by visit when not None, otherwise return a new normalized expression with traverse-visit sub-expressions.