Table of Contents

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

TNodeId
TEdgeId

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

From TNodeId

The first node.

To TNodeId

The last node.

Cost double

The sum of the costs of the steps.

Steps IReadOnlyList<PathStep<TNodeId, TEdgeId>>

The edges in order; empty if From and To are the same node.

Properties

Cost

The sum of the costs of the steps.

public double Cost { get; init; }

Property Value

double

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