コード例 #1
0
ファイル: Astar.cs プロジェクト: bfawber/GenericAStar
 public Astar(Func <Node <T>, Node <T>, int> hueristic, Action <Node <T> > populateChildren)
 {
     this.hueristic        = hueristic;
     this.populateChildren = populateChildren;
     this.open             = new HTbl <int, Node <T> >();
     this.closed           = new List <Node <T> >();
 }
コード例 #2
0
ファイル: Astar.cs プロジェクト: bfawber/GenericAStar
        private Node <T> removeLowestF(HTbl <int, Node <T> > nodes)
        {
            Node <T> node = nodes.Pop(0);

            for (int i = 0; node == null; i++)
            {
                node = nodes.Pop(i);
            }

            return(node);
        }