2024-07-22 04:56:22 +02:00
|
|
|
|
namespace astar;
|
|
|
|
|
|
2024-07-23 16:42:03 +02:00
|
|
|
|
public class Node(float lat, float lon, Dictionary<ulong, KeyValuePair<ulong, bool>>? neighbors = null) : global::Graph.Node(lat, lon, neighbors)
|
2024-07-22 04:56:22 +02:00
|
|
|
|
{
|
2024-07-23 02:21:20 +02:00
|
|
|
|
public ulong? PreviousNodeId = null;
|
2024-07-23 19:10:29 +02:00
|
|
|
|
public float? Metric = null;
|
2024-07-22 04:56:22 +02:00
|
|
|
|
public bool? PreviousIsFromStart = null;
|
|
|
|
|
|
|
|
|
|
public static Node FromGraphNode(global::Graph.Node node) => new (node.Lat, node.Lon, node.Neighbors);
|
|
|
|
|
|
|
|
|
|
public override string ToString()
|
|
|
|
|
{
|
2024-07-23 19:10:29 +02:00
|
|
|
|
return $"{Lat:00.000000} {Lon:000.000000} Previous {PreviousNodeId} {Metric} {(PreviousIsFromStart is not null ? PreviousIsFromStart.Value ?"Start":"End" : null)}";
|
2024-07-22 04:56:22 +02:00
|
|
|
|
}
|
|
|
|
|
}
|