1
0
Fork 0

Superficial clean up of comments

This commit is contained in:
Joris van Rantwijk 2023-05-12 21:50:07 +02:00
parent 3aa2b20a74
commit dd452f73da
1 changed files with 10 additions and 27 deletions

View File

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