Show / Hide Table of Contents

Interface IDistancesCollection<TVertex>

Represents an object that stores information about distances between vertices.

Namespace: QuikGraph.Algorithms
Assembly: QuikGraph.dll
Syntax
public interface IDistancesCollection<TVertex>
Type Parameters
Name Description
TVertex

Vertex type.

Methods

| Improve this Doc View Source

GetDistance(TVertex)

Gets the distance associated to the given vertex.

Declaration
double GetDistance(TVertex vertex)
Parameters
Type Name Description
TVertex vertex

The vertex to get the distance for.

Returns
Type Description
System.Double

The distance associated with the vertex.

Exceptions
Type Condition
System.ArgumentNullException

vertex is null.

VertexNotFoundException

vertex has no recorded distance.

| Improve this Doc View Source

GetDistances()

Gets the distances for all vertices currently known.

Declaration
IEnumerable<KeyValuePair<TVertex, double>> GetDistances()
Returns
Type Description
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TVertex, System.Double>>

The System.Collections.Generic.KeyValuePair{Vertex,Distance} for the known vertices.

| Improve this Doc View Source

TryGetDistance(TVertex, out Double)

Tries to get the distance associated to the given vertex.

Declaration
bool TryGetDistance(TVertex vertex, out double distance)
Parameters
Type Name Description
TVertex vertex

The vertex.

System.Double distance

Associated distance.

Returns
Type Description
System.Boolean

True if the distance was found, false otherwise.

Exceptions
Type Condition
System.ArgumentNullException

vertex is null.

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