medpy.graphcut.graph.GCGraph.set_nweights¶
-
GCGraph.
set_nweights
(nweights)[source]¶ Set multiple n-weights / edge-weights.
Parameters: nweights : dict
A dictionary with (node-id, node-id) tuples as keys and (weight-a-to-b, weight-b-to-a) as values.
Notes
The object does not check if the number of supplied edges in total exceeds the number passed to the init-method. If this is the case, the underlying C++ implementation will double the memory, which is very inefficient.
See
set_nweight
for raised errors.