AStar/Graph/Node.cs

25 lines
594 B
C#
Raw Normal View History

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; }
2022-10-31 23:10:28 +01:00
public HashSet<Edge> edges { get; }
2022-05-05 15:49:28 +02:00
2022-11-02 18:07:22 +01:00
public Node? previousNode { get; set; }
2022-10-31 23:10:28 +01:00
public float goalDistance { get; set; }
2022-05-06 00:02:28 +02:00
2022-11-02 18:09:30 +01:00
public float timeSpent { get; set; }
2022-05-05 15:49:28 +02:00
public Node(float lat, float lon)
{
this.lat = lat;
this.lon = lon;
2022-10-31 23:10:28 +01:00
this.edges = new();
2022-11-02 18:07:22 +01:00
this.previousNode = null;
2022-10-31 23:10:28 +01:00
this.goalDistance = float.MaxValue;
2022-11-02 18:09:30 +01:00
this.timeSpent = float.MaxValue;
2022-05-05 15:49:28 +02:00
}
}
}