Satsuma
a delicious .NET graph library
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Pages
Public Member Functions | Properties | List of all members
Satsuma.HamiltonianCycle Class Reference

Attempts to find a (directed) Hamiltonian cycle in a graph using TSP solvers. More...

Public Member Functions

 HamiltonianCycle (IGraph graph)
 

Properties

IPath Cycle [get, set]
 A Hamiltonian cycle in the input graph, or null if none has been found. More...
 
IGraph Graph [get, set]
 The input graph. More...
 

Detailed Description

Attempts to find a (directed) Hamiltonian cycle in a graph using TSP solvers.

Edges can be traversed in both directions.

Warning
If no Hamiltonian cycle is found by this class, that does not prove the nonexistence thereof. However, there are some easy graph properties which prohibit the existence of a Hamiltonian cycle. Namely, if a graph is not 2-connected (see Connectivity.BiNodeConnectedComponents), then it cannot contain a Hamiltonian cycle.

Definition at line 334 of file Tsp.cs.

Constructor & Destructor Documentation

Satsuma.HamiltonianCycle.HamiltonianCycle ( IGraph  graph)

Definition at line 343 of file Tsp.cs.

Property Documentation

IPath Satsuma.HamiltonianCycle.Cycle
getset

A Hamiltonian cycle in the input graph, or null if none has been found.

The returned path is a cycle, that is, its start and end nodes are always equal.

Note
The existence of a Hamiltonian cycle does not guarantee that this class finds it.

Definition at line 341 of file Tsp.cs.

IGraph Satsuma.HamiltonianCycle.Graph
getset

The input graph.

Definition at line 337 of file Tsp.cs.


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