_dispatch(func=None, *, name=None, graphs='G')[source]#

Dispatches to a backend algorithm when the first argument is a backend graph-like object.

The algorithm name is assumed to be the name of the wrapped function unless name is provided. This is useful to avoid name conflicts, as all dispatched algorithms live in a single namespace.

If more than one graph is required for the algorithm, provide a comma-separated string of variable names as graphs. These must be the same order and name as the variables passed to the algorithm. Dispatching does not support graphs which are not the first argument(s) to an algorithm.