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 SourceGetDistance(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 |
|
VertexNotFoundException |
|
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. |
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 |
|