cutcutcodec.core.opti.utils

Little tools used by some functions of graph optimization.

Functions

node_selector(criteria)

Decorate for selecting and appening the node kwargs to the decorated function.

Details

cutcutcodec.core.opti.utils.node_selector(criteria: Callable)[source]

Decorate for selecting and appening the node kwargs to the decorated function.

Parameters

criteriacallable

A function that take in argument the graph (networkx.networkx.MultiDiGraph) and the node name (str). It returns True if the node can be selected, False otherwise.