Exemplo n.º 1
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
 }
Exemplo n.º 2
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
        }
Exemplo n.º 3
0
 public static bool a_star(Intarray inputs,
         Intarray vertices,
         Intarray outputs,
         Floatarray costs,
         OcroFST fst)
 {
     AStarSearch a = new AStarSearch(fst);
     if (!a.Loop())
         return false;
     if (!a.reconstruct_vertices(vertices))
         return false;
     a.reconstruct_edges(inputs, outputs, costs, vertices);
     return true;
 }
Exemplo n.º 4
0
        public static bool a_star(Intarray inputs,
                                  Intarray vertices,
                                  Intarray outputs,
                                  Floatarray costs,
                                  OcroFST fst)
        {
            AStarSearch a = new AStarSearch(fst);

            if (!a.Loop())
            {
                return(false);
            }
            if (!a.reconstruct_vertices(vertices))
            {
                return(false);
            }
            a.reconstruct_edges(inputs, outputs, costs, vertices);
            return(true);
        }