diff --git a/cpp/mwmatching.h b/cpp/mwmatching.h index 6ae16dd..cbf688c 100644 --- a/cpp/mwmatching.h +++ b/cpp/mwmatching.h @@ -190,8 +190,8 @@ template struct NonTrivialBlossom; * vertex in the same blossom. This is the "base vertex" of the blossom. */ template -struct Blossom { - +struct Blossom +{ /** Parent of this blossom, or "nullptr" if this blossom is top-level. */ NonTrivialBlossom* parent; @@ -338,7 +338,6 @@ struct AlternatingPath template struct MatchingContext { - // Alias for edge type. using EdgeT = Edge; using BlossomT = Blossom; using NonTrivialBlossomT = NonTrivialBlossom; @@ -475,9 +474,7 @@ struct MatchingContext MatchingContext(const MatchingContext&) = delete; MatchingContext& operator=(const MatchingContext&) = delete; - /* - * Static methods used by the constructor: - */ + /* ********** Static methods used by the constructor: ********** */ /** Count the number of vertices in the graph. */ static VertexId count_num_vertex(const std::vector& edges) @@ -531,9 +528,7 @@ struct MatchingContext return adjacent_edges; } - /* - * General support routines: - */ + /* ********** General support routines: ********** */ /** Calculate edge slack. */ WeightType edge_slack(const EdgeT& edge) const @@ -837,9 +832,7 @@ struct MatchingContext return std::make_pair(best_edge, best_slack); } - /* - * Creating and expanding blossoms: - */ + /* ********** Creating and expanding blossoms: ********** */ /** * Trace back through the alternating trees from vertices "x" and "y". @@ -1127,9 +1120,7 @@ struct MatchingContext erase_nontrivial_blossom(blossom); } - /* - * Augmenting: - */ + /* ********** Augmenting: ********** */ /** * Augment along an alternating path through the specified blossom, @@ -1296,9 +1287,7 @@ struct MatchingContext } } - /* - * Labels and alternating tree: - */ + /* ********** Labels and alternating tree: ********** */ /** * Assign label S to the unlabeled blossom that contains vertex "x". @@ -1496,9 +1485,7 @@ struct MatchingContext return false; } - /* - * Delta steps: - */ + /* ********** Delta steps: ********** */ /** * Calculate a delta step in the dual LPP problem. @@ -1590,9 +1577,7 @@ struct MatchingContext } } - /* - * Main algorithm: - */ + /* ********** Main algorithm: ********** */ /** * Reset data which are only valid during a stage. @@ -1722,9 +1707,7 @@ struct MatchingContext while (run_stage()) ; } - /* - * Verify optimal solution: - */ + /* ********** Verify optimal solution: ********** */ /** * Helper function for verifying the solution.