2022-05-05 16:12:40 +02:00
|
|
|
|
namespace Graph
|
2022-05-05 15:49:28 +02:00
|
|
|
|
{
|
2022-05-06 00:02:28 +02:00
|
|
|
|
public class Node
|
2022-05-05 15:49:28 +02:00
|
|
|
|
{
|
|
|
|
|
public float lat { get; }
|
|
|
|
|
public float lon { get; }
|
|
|
|
|
public List<Edge> edges { get; }
|
|
|
|
|
|
2022-05-06 00:02:28 +02:00
|
|
|
|
public Node previousNode { get; set; }
|
|
|
|
|
public double goalDistance { get; set; }
|
|
|
|
|
|
2022-05-06 00:31:26 +02:00
|
|
|
|
public double pathLength { get; set; }
|
|
|
|
|
|
2022-05-05 15:49:28 +02:00
|
|
|
|
public Node(float lat, float lon)
|
|
|
|
|
{
|
|
|
|
|
this.lat = lat;
|
|
|
|
|
this.lon = lon;
|
2022-05-06 00:02:28 +02:00
|
|
|
|
this.edges = new List<Edge>();
|
|
|
|
|
this.previousNode = nullnode;
|
2022-05-06 00:31:26 +02:00
|
|
|
|
this.goalDistance = double.MaxValue;
|
|
|
|
|
this.pathLength = double.MaxValue;
|
2022-05-05 15:49:28 +02:00
|
|
|
|
}
|
2022-05-06 00:02:28 +02:00
|
|
|
|
public static Node nullnode = new Node(float.NaN, float.NaN);
|
2022-05-05 15:49:28 +02:00
|
|
|
|
}
|
|
|
|
|
}
|