C++ Reference
C++ Reference: Graph
ChristofidesPathSolver< CostType, ArcIndex, NodeIndex, CostFunction >
Detailed Description
template<typename CostType, typename ArcIndex = int64, typename NodeIndex = int32, typename CostFunction = std::function<CostType(NodeIndex, NodeIndex)>>
class operations_research::ChristofidesPathSolver< CostType, ArcIndex, NodeIndex, CostFunction >
Definition at line 40 of file christofides.h.
Public Types | |
enum | MatchingAlgorithm { MINIMUM_WEIGHT_MATCHING, MINIMUM_WEIGHT_MATCHING_WITH_MIP, MINIMAL_WEIGHT_MATCHING } |
Public Member Functions | |
ChristofidesPathSolver (NodeIndex num_nodes, CostFunction costs) | |
void | SetMatchingAlgorithm (MatchingAlgorithm matching) |
CostType | TravelingSalesmanCost () |
std::vector< NodeIndex > | TravelingSalesmanPath () |
Member Enumeration Documentation
◆ MatchingAlgorithm
|
strong |
Enumerator | |
---|---|
MINIMUM_WEIGHT_MATCHING | |
MINIMUM_WEIGHT_MATCHING_WITH_MIP | |
MINIMAL_WEIGHT_MATCHING |
Definition at line 42 of file christofides.h.
Constructor & Destructor Documentation
◆ ChristofidesPathSolver()
ChristofidesPathSolver | ( | NodeIndex | num_nodes, |
CostFunction | costs | ||
) |
Definition at line 212 of file christofides.h.
Member Function Documentation
◆ SetMatchingAlgorithm()
|
inline |
Definition at line 59 of file christofides.h.
◆ TravelingSalesmanCost()
CostType TravelingSalesmanCost |
Definition at line 223 of file christofides.h.
◆ TravelingSalesmanPath()
std::vector< NodeIndex > TravelingSalesmanPath |
Definition at line 233 of file christofides.h.
The documentation for this class was generated from the following file: