C++ Reference: class ChristofidesPathSolver
Note: This documentation is automatically generated.
Method | |
---|---|
ChristofidesPathSolver | Arguments: |
SetMatchingAlgorithm | Return type: Arguments: Sets the matching algorithm to use. A minimum weight perfect matching (MINIMUM_WEIGHT_MATCHING) guarantees the 3/2 upper bound to the optimal solution. A minimal weight perfect matching (MINIMAL_WEIGHT_MATCHING) finds a locally minimal weight matching which does not offer any bound guarantee but, as of 1/2017, is orders of magnitude faster than the minimum matching. By default, MINIMAL_WEIGHT_MATCHING is selected. TODO(user): Change the default when minimum matching gets faster. |
Solve | Return type: Runs the Christofides algorithm. Returns true if a solution was found, false otherwise. |
TravelingSalesmanCost | Return type: Returns the cost of the approximate TSP tour. |
TravelingSalesmanPath | Return type: Returns the approximate TSP tour. |