Class NetworkPath<TNodeId, TEdgeId>
- Namespace
- SpatialNET.Network
- Assembly
- SpatialNET.Network.dll
The cheapest way between two nodes, as a sequence of edges (ADR 0049).
public sealed record NetworkPath<TNodeId, TEdgeId> : IEquatable<NetworkPath<TNodeId, TEdgeId>> where TNodeId : notnull, IEquatable<TNodeId> where TEdgeId : notnull, IEquatable<TEdgeId>Type Parameters
TNodeIdTEdgeId
Inheritance
Implements
Inherited Members
Extension Methods
Constructors
NetworkPath(TNodeId, TNodeId, double, IReadOnlyList<PathStep<TNodeId, TEdgeId>>)
The cheapest way between two nodes, as a sequence of edges (ADR 0049).
public NetworkPath(TNodeId From, TNodeId To, double Cost, IReadOnlyList<PathStep<TNodeId, TEdgeId>> Steps)Parameters
FromTNodeId-
The first node.
ToTNodeId-
The last node.
Costdouble-
The sum of the costs of the steps.
StepsIReadOnlyList<PathStep<TNodeId, TEdgeId>>-
The edges in order; empty if
FromandToare the same node.
Properties
Cost
The sum of the costs of the steps.
public double Cost { get; init; }Property Value
From
The first node.
public TNodeId From { get; init; }Property Value
- TNodeId
Steps
The edges in order; empty if From and To are the same node.
public IReadOnlyList<PathStep<TNodeId, TEdgeId>> Steps { get; init; }Property Value
- IReadOnlyList<PathStep<TNodeId, TEdgeId>>
To
The last node.
public TNodeId To { get; init; }Property Value
- TNodeId