if forest is None and coforest is None: forest, coforest, _ = self.forest_coforest_decomposition() elif forest is None or coforest is None: raise ValueError("forest and coforest must be given together")
We should not leave an exception here if only one of forest or coforest is given. Instead it would be better to compute the missing forest or coforest with _spanning_tree.
if forest is None and coforest is None: forest, coforest, _ = self.forest_coforest_decomposition() elif forest is None or coforest is None: raise ValueError("forest and coforest must be given together")We should not leave an exception here if only one of forest or coforest is given. Instead it would be better to compute the missing forest or coforest with
_spanning_tree.