A class that manages shortest path computation.
More...
A class that manages shortest path computation.
NetTopologySuite.Samples.Tests.Various.PathFinder.PathFinder |
( |
bool |
bidirectional | ) |
|
Initializes a new instance of the GraphBuilder2 class.
- Parameters
-
bidirectional | Specify if the graph must be build using both edges directions. |
NetTopologySuite.Samples.Tests.Various.PathFinder.PathFinder |
( |
| ) |
|
Initializes a new instance of the GraphBuilder2 class, using a directed graph.
bool NetTopologySuite.Samples.Tests.Various.PathFinder.Add |
( |
params ILineString[] |
lines | ) |
|
Adds each line to the graph structure.
- Parameters
-
- Returns
true
if all lines lines are added, false
otherwise.
- Exceptions
-
TopologyException | If geometries don't have the same factory. |
delegate double NetTopologySuite.Samples.Tests.Various.PathFinder.ComputeWeightDelegate |
( |
ILineString |
line | ) |
|
A delegate that defines how to calculate the weight of a line.
- Parameters
-
- Returns
- The weight of the line.
IGeometry NetTopologySuite.Samples.Tests.Various.PathFinder.Find |
( |
IGeometry |
source, |
|
|
IGeometry |
destination |
|
) |
| |
Carries out the shortest path anlayis between the two nodes passed as variables and returns an ILineString giveing the shortest path.
- Parameters
-
source | The source geom |
destination | The destination geom |
A ILineString or a IMultiLineString with all the elements of the graph that composes the shortest path, sequenced using a LineSequencer.
IGeometry NetTopologySuite.Samples.Tests.Various.PathFinder.Find |
( |
Coordinate |
source, |
|
|
Coordinate |
destination |
|
) |
| |
Carries out the shortest path between the two nodes ids passed as variables and returns an ILineString giveing the shortest path.
- Parameters
-
source | The source node |
destination | The destination node |
A ILineString or a IMultiLineString with all the elements of the graph that composes the shortest path, sequenced using a LineSequencer.
void NetTopologySuite.Samples.Tests.Various.PathFinder.Initialize |
( |
| ) |
|
Initialize the algorithm using the default weight computer, that uses string length as weight value.
- Exceptions
-
TopologyException | If you've don't added two or more geometries to the builder. |
ApplicationException | If builder is already initialized. |
Initialize the algorithm using the specified computer weight computer
- Parameters
-
computer | A function that computes the weight of any edge of the graph. |
- Exceptions
-
TopologyException | If you've don't added two or more geometries to the builder. |
ApplicationException | If builder is already initialized. |
The documentation for this class was generated from the following file:
- NetTopologySuite/NetTopologySuite.Samples.Console/Tests/Various/PathFinder.cs