Exemple #1
0
 public Neighbour(CGraphNode cGraphNode, float cost)
 {
     node      = cGraphNode;
     this.cost = cost;
 }
Exemple #2
0
 /// <summary>
 /// 添加邻接信息
 /// </summary>
 /// <param name="cGraphNode">邻居节点</param>
 /// <param name="cost">到邻居的代价</param>
 public void AddNeighbour(CGraphNode cGraphNode, float cost)
 {
     Neighbours.Add(new Neighbour(cGraphNode, cost));
     cGraphNode.Neighbours.Add(new Neighbour(this, cost));
 }
Exemple #3
0
 /// <summary>
 /// 默认相邻点见成本为1的方法
 /// </summary>
 /// <param name="cGraphNode"></param>
 public void AddNeighbour(CGraphNode cGraphNode)
 {
     AddNeighbour(cGraphNode, 1f);
 }
Exemple #4
0
 public void FillValue(float g, CGraphNode parent)
 {
     G      = g;
     Parent = parent;
 }