Show / Hide Table of Contents

Class IsHamiltonianGraphAlgorithm<TVertex, TEdge>

Algorithm that checks if a graph is Hamiltonian (has a path that links all vertices and pass one and only one time by each vertex).

Inheritance
System.Object
IsHamiltonianGraphAlgorithm<TVertex, TEdge>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: QuikGraph.Algorithms
Assembly: QuikGraph.dll
Syntax
public class IsHamiltonianGraphAlgorithm<TVertex, TEdge>
    where TEdge : IUndirectedEdge<TVertex>
Type Parameters
Name Description
TVertex

Vertex type.

TEdge

Edge type.

Constructors

| Improve this Doc View Source

IsHamiltonianGraphAlgorithm(IUndirectedGraph<TVertex, TEdge>)

Initializes a new instance of the IsHamiltonianGraphAlgorithm<TVertex, TEdge> class.

Declaration
public IsHamiltonianGraphAlgorithm(IUndirectedGraph<TVertex, TEdge> graph)
Parameters
Type Name Description
IUndirectedGraph<TVertex, TEdge> graph

Graph to check.

Exceptions
Type Condition
System.ArgumentNullException

graph is null.

Methods

| Improve this Doc View Source

GetPermutations()

Gets vertices permutations.

Declaration
public List<List<TVertex>> GetPermutations()
Returns
Type Description
System.Collections.Generic.List<System.Collections.Generic.List<TVertex>>

List of permutations.

| Improve this Doc View Source

IsHamiltonian()

Returns true if the graph is Hamiltonian, otherwise false.

Declaration
public bool IsHamiltonian()
Returns
Type Description
System.Boolean

True if the graph is Hamiltonian, false otherwise.

Extension Methods

GraphMLExtensions.SerializeToGraphML<TVertex, TEdge, TGraph>(TGraph, String)
GraphMLExtensions.SerializeToGraphML<TVertex, TEdge, TGraph>(TGraph, String, VertexIdentity<TVertex>, EdgeIdentity<TVertex, TEdge>)
GraphMLExtensions.SerializeToGraphML<TVertex, TEdge, TGraph>(TGraph, XmlWriter)
GraphMLExtensions.SerializeToGraphML<TVertex, TEdge, TGraph>(TGraph, XmlWriter, VertexIdentity<TVertex>, EdgeIdentity<TVertex, TEdge>)
GraphMLExtensions.DeserializeFromGraphML<TVertex, TEdge, TGraph>(TGraph, XmlReader, IdentifiableVertexFactory<TVertex>, IdentifiableEdgeFactory<TVertex, TEdge>)
GraphMLExtensions.DeserializeFromGraphML<TVertex, TEdge, TGraph>(TGraph, TextReader, IdentifiableVertexFactory<TVertex>, IdentifiableEdgeFactory<TVertex, TEdge>)
GraphMLExtensions.DeserializeFromGraphML<TVertex, TEdge, TGraph>(TGraph, String, IdentifiableVertexFactory<TVertex>, IdentifiableEdgeFactory<TVertex, TEdge>)
GraphMLExtensions.DeserializeAndValidateFromGraphML<TVertex, TEdge, TGraph>(TGraph, TextReader, IdentifiableVertexFactory<TVertex>, IdentifiableEdgeFactory<TVertex, TEdge>)
SerializationExtensions.SerializeToXml<TVertex, TEdge, TGraph>(TGraph, XmlWriter, VertexIdentity<TVertex>, EdgeIdentity<TVertex, TEdge>, String, String, String, String)
SerializationExtensions.SerializeToXml<TVertex, TEdge, TGraph>(TGraph, XmlWriter, VertexIdentity<TVertex>, EdgeIdentity<TVertex, TEdge>, String, String, String, String, Action<XmlWriter, TGraph>, Action<XmlWriter, TVertex>, Action<XmlWriter, TEdge>)
  • Improve this Doc
  • View Source
In This Article
Back to top QuikGraph