예제 #1
0
파일: Heap.cs 프로젝트: liaoheping/OCRonet
        public int Pop()
        {
            heapswap(0, heap.Length() - 1);
            int result = heap.Pop();

            costs.Pop();
            heapify_down(0);
            heapback[result] = -1;
            return(result);
        }
예제 #2
0
파일: AStarUtil.cs 프로젝트: nickun/OCRonet
 public static void a_star_backwards(Floatarray costs_for_all_nodes, IGenericFst fst)
 {
     IGenericFst reverse = FstFactory.MakeOcroFST();
     FstUtil.fst_copy_reverse(reverse, fst, true); // creates an extra vertex
     AStarSearch a = new AStarSearch(reverse);
     a.Loop();
     costs_for_all_nodes.Copy(a.g);
     costs_for_all_nodes.Pop(); // remove the extra vertex
 }
예제 #3
0
        public static void a_star_backwards(Floatarray costs_for_all_nodes, IGenericFst fst)
        {
            IGenericFst reverse = FstFactory.MakeOcroFST();

            FstUtil.fst_copy_reverse(reverse, fst, true); // creates an extra vertex
            AStarSearch a = new AStarSearch(reverse);

            a.Loop();
            costs_for_all_nodes.Copy(a.g);
            costs_for_all_nodes.Pop(); // remove the extra vertex
        }