mincut doesn't handle multiple components
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
igraph |
Fix Released
|
Medium
|
Tamás Nepusz |
Bug Description
i realize that min-cut doesn't make sense on graphs with multiple components, but there should be some mechanism for erroring when this is the case. for example, the following code in python.
--
import igraph
g = igraph.Graph()
g.add_vertices(2)
g.add_edges(
print len(g.components())
print g.mincut([1000])
--
Outputs the following:
2
Graph cut (1 edges, 1 vs 2 vertices, value=0.0000)
>>>
I was modifying a graph by deleting some vertices (I thought my code would not create multiple components) and so i ran mincut and took me forever to figure out this weirdness. It's a bug in the sense that the output of the function doesn't make any sense. Better to return an error as opposed to continuing with invalid data.
Related branches
description: | updated |
Changed in igraph: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → Tamás Nepusz (ntamas) |
Changed in igraph: | |
milestone: | none → 0.6 |
Does it make sense to return an empty edge set?