2022-05-05 16:12:40 +02:00
|
|
|
|
namespace Graph
|
2022-05-05 15:49:28 +02:00
|
|
|
|
{
|
|
|
|
|
public struct Edge
|
|
|
|
|
{
|
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-10-31 23:10:28 +01:00
|
|
|
|
public float weight { get; }
|
|
|
|
|
public Edge(Node neighbor, float weight)
|
2022-05-05 15:49:28 +02:00
|
|
|
|
{
|
|
|
|
|
this.neighbor = neighbor;
|
2022-05-05 16:23:00 +02:00
|
|
|
|
this.weight = weight;
|
2022-11-01 05:09:01 +01:00
|
|
|
|
this.id = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Edge(Node neighbor, float weight, ulong id)
|
|
|
|
|
{
|
|
|
|
|
this.neighbor = neighbor;
|
|
|
|
|
this.weight = weight;
|
|
|
|
|
this.id = id;
|
2022-05-05 15:49:28 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|