cspy.check¶
- cspy.check(G, max_res=None, min_res=None, direction=None, REF_callback=None, algorithm=None)¶
Checks whether inputs and the graph are of the appropriate types and have the required properties. For non-specified REFs, removes nodes that cannot be reached due to resource limits.
Parameters¶
- Gobject instance
nx.Digraph()
must have
n_res
graph attribute and all edges must haveres_cost
attribute.- max_reslist of floats, optional
upper bound for resource usage. We must have
len(max_res)
- min_reslist of floats, optional
lower bounds for resource usage. We must have
len(min_res)
len(max_res)
- directionstring, optional
preferred search direction. Either ‘both’,’forward’, or, ‘backward’. Default : ‘both’.
- REF_forward, REF_backward, REF_joinfunctions, optional
Custom resource extension function. See REFs for more details.
- raises
Raises exceptions if incorrect input is given. If multiple exceptions are raised, an exception with a list of errors is raised.
- Gobject instance