AStar/Graph/Edge.cs

19 lines
454 B
C#
Raw Normal View History

namespace Graph
2022-05-05 15:49:28 +02:00
{
2022-11-03 19:13:26 +01:00
public class Edge
2022-05-05 15:49:28 +02:00
{
2022-11-01 05:09:01 +01:00
public ulong id { get; }
2022-05-05 15:49:28 +02:00
public Node neighbor { get; }
2022-11-03 19:13:26 +01:00
public float time { get; }
public float distance { get; }
2022-11-01 05:09:01 +01:00
2022-11-03 19:13:26 +01:00
public Edge(Node neighbor, float time, float distance, ulong? id)
2022-11-01 05:09:01 +01:00
{
this.neighbor = neighbor;
2022-11-03 19:13:26 +01:00
this.time = time;
this.distance = distance;
this.id = (id != null) ? id.Value : 0;
2022-05-05 15:49:28 +02:00
}
}
}