コード例 #1
0
 public Neighbour(CGraphNode cGraphNode, float cost)
 {
     node      = cGraphNode;
     this.cost = cost;
 }
コード例 #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));
 }
コード例 #3
0
 /// <summary>
 /// 默认相邻点见成本为1的方法
 /// </summary>
 /// <param name="cGraphNode"></param>
 public void AddNeighbour(CGraphNode cGraphNode)
 {
     AddNeighbour(cGraphNode, 1f);
 }
コード例 #4
0
 public void FillValue(float g, CGraphNode parent)
 {
     G      = g;
     Parent = parent;
 }