1
0
Fork 0

Minor cleanup of code layout

This commit is contained in:
Joris van Rantwijk 2023-05-13 20:35:08 +02:00
parent a9010855a5
commit 250fd4ea94
1 changed files with 3 additions and 6 deletions

View File

@ -691,10 +691,8 @@ struct MatchingContext
void lset_new_blossom(BlossomT* blossom) void lset_new_blossom(BlossomT* blossom)
{ {
assert(blossom->best_edge == nullptr); assert(blossom->best_edge == nullptr);
NonTrivialBlossomT* ntb = blossom->nontrivial(); assert((blossom->nontrivial() == nullptr)
if (ntb) { || blossom->nontrivial()->best_edge_set.empty());
assert(ntb->best_edge_set.empty());
}
} }
/** /**
@ -743,8 +741,7 @@ struct MatchingContext
} else { } else {
// Trivial blossoms don't maintain a least-slack edge set. // Trivial blossoms don't maintain a least-slack edge set.
// Just consider all incident edges. // Just consider all incident edges.
for (const EdgeT* edge : for (const EdgeT* edge : adjacent_edges[sub->base_vertex]) {
adjacent_edges[sub->base_vertex]) {
// Only take edges between different S-blossoms. // Only take edges between different S-blossoms.
VertexId x = edge->vt.first; VertexId x = edge->vt.first;
VertexId y = edge->vt.second; VertexId y = edge->vt.second;