[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eHamiltonianPathSolver\u003c/code\u003e class in C++ helps find the shortest Hamiltonian path or Traveling Salesman Problem (TSP) tour in a graph.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to calculate and retrieve the path, cost, and the best end-node for the path.\u003c/p\u003e\n"],["\u003cp\u003eYou can modify the cost matrix of the graph using \u003ccode\u003eChangeCostMatrix\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class offers functions to check for robustness (\u003ccode\u003eIsRobust\u003c/code\u003e) and triangle inequality (\u003ccode\u003eVerifiesTriangleInequality\u003c/code\u003e) within the cost matrix.\u003c/p\u003e\n"],["\u003cp\u003eDeprecated APIs exist for retrieving the Hamiltonian path and TSP tour; use the updated methods with return types of \u003ccode\u003estd::vector<int>\u003c/code\u003e instead.\u003c/p\u003e\n"]]],["The `HamiltonianPathSolver` class calculates the shortest Hamiltonian path and Traveling Salesman Problem (TSP) solutions. It can change the cost matrix via `ChangeCostMatrix`. The solver returns the end node with the shortest Hamiltonian path from 0 using `BestHamiltonianPathEndNode`. `HamiltonianCost` gets the cost from 0 to an end node and `HamiltonianPath` provides the actual shortest path. It also determines `TravelingSalesmanCost` and `TravelingSalesmanPath` for the TSP tour. Finally, `IsRobust` and `VerifiesTriangleInequality` provide information about the cost matrix.\n"],null,[]]