OR-Tools  9.6
HamiltonianPathSolver< CostType, CostFunction >

Detailed Description

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

Definition at line 454 of file hamiltonian_path.h.

Public Types

typedef uint32_t Integer
 
typedef Set< IntegerNodeSet
 

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

typedef uint32_t Integer

Definition at line 476 of file hamiltonian_path.h.

◆ NodeSet

typedef Set<Integer> NodeSet

Definition at line 477 of file hamiltonian_path.h.

Constructor & Destructor Documentation

◆ HamiltonianPathSolver() [1/2]

HamiltonianPathSolver ( CostFunction  cost)
explicit

Definition at line 607 of file hamiltonian_path.h.

◆ HamiltonianPathSolver() [2/2]

HamiltonianPathSolver ( int  num_nodes,
CostFunction  cost 
)

Definition at line 612 of file hamiltonian_path.h.

Member Function Documentation

◆ BestHamiltonianPathEndNode()

int BestHamiltonianPathEndNode

Definition at line 832 of file hamiltonian_path.h.

◆ ChangeCostMatrix() [1/2]

void ChangeCostMatrix ( CostFunction  cost)

Definition at line 628 of file hamiltonian_path.h.

◆ ChangeCostMatrix() [2/2]

void ChangeCostMatrix ( int  num_nodes,
CostFunction  cost 
)

Definition at line 634 of file hamiltonian_path.h.

◆ HamiltonianCost()

CostType HamiltonianCost ( int  end_node)

Definition at line 838 of file hamiltonian_path.h.

◆ HamiltonianPath() [1/2]

std::vector< int > HamiltonianPath ( int  end_node)

Definition at line 845 of file hamiltonian_path.h.

◆ HamiltonianPath() [2/2]

void HamiltonianPath ( std::vector< PathNodeIndex > *  path)

Definition at line 852 of file hamiltonian_path.h.

◆ IsRobust()

bool IsRobust

Definition at line 786 of file hamiltonian_path.h.

◆ TravelingSalesmanCost()

CostType TravelingSalesmanCost

Definition at line 859 of file hamiltonian_path.h.

◆ TravelingSalesmanPath() [1/2]

std::vector< int > TravelingSalesmanPath

Definition at line 866 of file hamiltonian_path.h.

◆ TravelingSalesmanPath() [2/2]

void TravelingSalesmanPath ( std::vector< PathNodeIndex > *  path)

Definition at line 872 of file hamiltonian_path.h.

◆ VerifiesTriangleInequality()

bool VerifiesTriangleInequality

Definition at line 811 of file hamiltonian_path.h.


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