Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::HamiltonianPathSolver< CostType, CostFunction > Class Template Reference

Detailed Description

template<typename CostType, typename CostFunction>
class operations_research::HamiltonianPathSolver< CostType, CostFunction >

Definition at line 458 of file hamiltonian_path.h.

#include <hamiltonian_path.h>

Public Types

using Integer = uint32_t
using NodeSet = Set<Integer>

Public Member Functions

 HamiltonianPathSolver (CostFunction cost)
 HamiltonianPathSolver (int num_nodes, CostFunction cost)
void ChangeCostMatrix (CostFunction cost)
void ChangeCostMatrix (int num_nodes, CostFunction cost)
CostType HamiltonianCost (int end_node)
std::vector< int > HamiltonianPath (int end_node)
int BestHamiltonianPathEndNode ()
void HamiltonianPath (std::vector< PathNodeIndex > *path)
CostType TravelingSalesmanCost ()
std::vector< int > TravelingSalesmanPath ()
void TravelingSalesmanPath (std::vector< PathNodeIndex > *path)
bool IsRobust ()
bool VerifiesTriangleInequality ()

Member Typedef Documentation

◆ Integer

template<typename CostType, typename CostFunction>
using operations_research::HamiltonianPathSolver< CostType, CostFunction >::Integer = uint32_t

Definition at line 480 of file hamiltonian_path.h.

◆ NodeSet

template<typename CostType, typename CostFunction>
using operations_research::HamiltonianPathSolver< CostType, CostFunction >::NodeSet = Set<Integer>

Definition at line 481 of file hamiltonian_path.h.

Constructor & Destructor Documentation

◆ HamiltonianPathSolver() [1/2]

template<typename CostType, typename CostFunction>
operations_research::HamiltonianPathSolver< CostType, CostFunction >::HamiltonianPathSolver ( CostFunction cost)
explicit

Definition at line 611 of file hamiltonian_path.h.

◆ HamiltonianPathSolver() [2/2]

template<typename CostType, typename CostFunction>
operations_research::HamiltonianPathSolver< CostType, CostFunction >::HamiltonianPathSolver ( int num_nodes,
CostFunction cost )

Definition at line 616 of file hamiltonian_path.h.

Member Function Documentation

◆ BestHamiltonianPathEndNode()

template<typename CostType, typename CostFunction>
int operations_research::HamiltonianPathSolver< CostType, CostFunction >::BestHamiltonianPathEndNode ( )

Definition at line 836 of file hamiltonian_path.h.

◆ ChangeCostMatrix() [1/2]

template<typename CostType, typename CostFunction>
void operations_research::HamiltonianPathSolver< CostType, CostFunction >::ChangeCostMatrix ( CostFunction cost)

Definition at line 632 of file hamiltonian_path.h.

◆ ChangeCostMatrix() [2/2]

template<typename CostType, typename CostFunction>
void operations_research::HamiltonianPathSolver< CostType, CostFunction >::ChangeCostMatrix ( int num_nodes,
CostFunction cost )

Definition at line 638 of file hamiltonian_path.h.

◆ HamiltonianCost()

template<typename CostType, typename CostFunction>
CostType operations_research::HamiltonianPathSolver< CostType, CostFunction >::HamiltonianCost ( int end_node)

Definition at line 842 of file hamiltonian_path.h.

◆ HamiltonianPath() [1/2]

template<typename CostType, typename CostFunction>
std::vector< int > operations_research::HamiltonianPathSolver< CostType, CostFunction >::HamiltonianPath ( int end_node)

Definition at line 849 of file hamiltonian_path.h.

◆ HamiltonianPath() [2/2]

template<typename CostType, typename CostFunction>
void operations_research::HamiltonianPathSolver< CostType, CostFunction >::HamiltonianPath ( std::vector< PathNodeIndex > * path)

Definition at line 856 of file hamiltonian_path.h.

◆ IsRobust()

template<typename CostType, typename CostFunction>
bool operations_research::HamiltonianPathSolver< CostType, CostFunction >::IsRobust ( )

Definition at line 790 of file hamiltonian_path.h.

◆ TravelingSalesmanCost()

template<typename CostType, typename CostFunction>
CostType operations_research::HamiltonianPathSolver< CostType, CostFunction >::TravelingSalesmanCost ( )

Definition at line 863 of file hamiltonian_path.h.

◆ TravelingSalesmanPath() [1/2]

template<typename CostType, typename CostFunction>
std::vector< int > operations_research::HamiltonianPathSolver< CostType, CostFunction >::TravelingSalesmanPath ( )

Definition at line 870 of file hamiltonian_path.h.

◆ TravelingSalesmanPath() [2/2]

template<typename CostType, typename CostFunction>
void operations_research::HamiltonianPathSolver< CostType, CostFunction >::TravelingSalesmanPath ( std::vector< PathNodeIndex > * path)

Definition at line 876 of file hamiltonian_path.h.

◆ VerifiesTriangleInequality()

template<typename CostType, typename CostFunction>
bool operations_research::HamiltonianPathSolver< CostType, CostFunction >::VerifiesTriangleInequality ( )

Definition at line 815 of file hamiltonian_path.h.


The documentation for this class was generated from the following file: