diff --git a/src/edmonds.cpp b/src/edmonds.cpp index 44012d6..e2de33b 100644 --- a/src/edmonds.cpp +++ b/src/edmonds.cpp @@ -117,7 +117,7 @@ void augment(GraphAttributes & attrs, std::vector const & x_path, std::v for(size_t i = 1; i < y_path.size(); i += 2) { attrs.mu[y_path[i]] = y_path[i+1]; - attrs.mu[y_path[i+1]] = x_path[i+1]; + attrs.mu[y_path[i+1]] = y_path[i]; } attrs.reset_forest(); collect_exposed_vertices(attrs, outer_unvisited_nodes); diff --git a/src/graph_attributes.h b/src/graph_attributes.h index b236636..4575123 100644 --- a/src/graph_attributes.h +++ b/src/graph_attributes.h @@ -49,7 +49,7 @@ namespace ED inline bool GraphAttributes::is_outer(NodeId const id) const { - return mu[id] == id or phi[mu[id]] == mu[id]; + return mu[id] == id or phi[mu[id]] != mu[id]; } inline