Ocronet.Dynamic.OcroFST.AStarSearch.AStarSearch C# (CSharp) Method

AStarSearch() public method

public AStarSearch ( IGenericFst fst ) : System
fst Ocronet.Dynamic.Interfaces.IGenericFst
return System
        public AStarSearch(IGenericFst fst)
        {
            this.fst = fst;
            this.accepted_from = -1;
            this.heap = new Heap(fst.nStates() + 1);
            this.n = fst.nStates();
            this.came_from = new Intarray(n);
            this.came_from.Fill(-1);
            this.g = new Floatarray(n);
            // insert the start node
            int s = fst.GetStart();
            g[s] = 0;
            came_from[s] = s;
            heap.Push(s, Convert.ToSingle(Heuristic(s)));
        }