stsb3.util

clear_cache

Clears cache of all predecessor nodes of root. This does not reset the cache mode of any node; to turn off caching, call set_cache_mode(root, False)

Args:

get_graph_from_root

Returns the compute graph with root as the single base node.

Args:

Returns:

get_name2block_from_root

Gets a {name: block} dict starting from the passed root node.

Args:

Returns:

graph (dict): a dict with structure {name : block}

get_nodes_from_root

Returns the root and all its predecessors in the graph.

Defines a BFS order on the compute graph of blocks.

Args:

Returns:

set_cache_mode

def set_cache_mode(root, cache, memoize=True):

Sets root and all predecessor nodes cache mode to cache.

Args: