Index: branches/cones-final/apps/matroid/src/matroid_from_graph.cc =================================================================== --- branches/cones-final/apps/matroid/src/matroid_from_graph.cc (revision 10003) +++ branches/cones-final/apps/matroid/src/matroid_from_graph.cc (revision 10314) @@ -1,3 +1,3 @@ -/* Copyright (c) 1997-2010 +/* Copyright (c) 1997-2011 Ewgenij Gawrilow, Michael Joswig (Technische Universitaet Darmstadt, Germany) http://www.polymake.de @@ -78,6 +78,16 @@ is_basis&=a[k]; if (is_basis) { - bases.push_back(basis); - ++n_bases; + //we still have to check if basis defines a forest, or, equivalently, that its restriction to each connected + //component of G is connected + Graph<> t(n_nodes); + for (Entire >::const_iterator j=entire(basis); !j.at_end(); ++j) + t.edge(start_nodes[*j],end_nodes[*j]); + perl::Object T("Graph<>"); + T.take("ADJACENCY")<