pystencils.flow.flowgraph.Subgraph#

class pystencils.flow.flowgraph.Subgraph(subgraph, predecessors, *, name=None)#

Another flowgraph embedded as a subgraph.

Parameters:
replace_predecessors(predecessors)#

Return a copy of this node with a new list of predecessors

Return type:

FlowgraphNode

Parameters:

predecessors (Iterable[FlowgraphNode])

property free_symbols: frozenset[Symbol]#

Free symbols of this node.

A symbol is free if it is used in this node’s equations but not defined in this node. Free symbols must be imported from predecessors.

property exports: frozenset[Symbol]#

Symbols exported by this node

property effects: frozenset[Store | Reduce]#

Effectful assignments in this node

subs(substitutions, **kwargs)#

Apply substitutions in this subgraph and return a new, transformed subgraph. :rtype: Subgraph

Note

Substitutions of expressions for symbols (symbol -> expr) are only applied if symbol is a free symbol of this subgraph.

Parameters:

substitutions (Mapping[Basic, Basic])

Return type:

Subgraph