Move2() public abstract method

Return the 2nd FST, releasing the ownership.
public abstract Move2 ( ) : IGenericFst
return Ocronet.Dynamic.Interfaces.IGenericFst
コード例 #1
0
ファイル: AStarUtil.cs プロジェクト: liaoheping/OCRonet
        public static bool a_star_in_composition(Intarray inputs,
                                                 Intarray vertices1,
                                                 Intarray vertices2,
                                                 Intarray outputs,
                                                 Floatarray costs,
                                                 OcroFST fst1,
                                                 Floatarray g1,
                                                 OcroFST fst2,
                                                 Floatarray g2)
        {
            CompositionFst composition = FstFactory.MakeCompositionFst(fst1, fst2);
            bool           result;

            try
            {
                result = a_star2_internal(inputs, vertices1, vertices2, outputs,
                                          costs, fst1, fst2,
                                          g1,
                                          g2, composition);
            }
            catch (Exception ex)
            {
                composition.Move1();
                composition.Move2();
                throw ex;
            }
            composition.Move1();
            composition.Move2();
            return(result);
        }
コード例 #2
0
ファイル: AStarUtil.cs プロジェクト: liaoheping/OCRonet
        public static bool a_star_in_composition(Intarray inputs,
                                                 Intarray vertices1,
                                                 Intarray vertices2,
                                                 Intarray outputs,
                                                 Floatarray costs,
                                                 OcroFST fst1,
                                                 OcroFST fst2)
        {
            CompositionFst composition = FstFactory.MakeCompositionFst(fst1, fst2);
            bool           result;

            try
            {
                //Floatarray g1 = new Floatarray();
                //Floatarray g2 = new Floatarray();
                fst1.CalculateHeuristics();
                fst2.CalculateHeuristics();
                result = a_star2_internal(inputs, vertices1, vertices2, outputs,
                                          costs, fst1, fst2,
                                          fst1.Heuristics(),
                                          fst2.Heuristics(), composition);
            }
            catch (Exception ex)
            {
                composition.Move1();
                composition.Move2();
                throw ex;
            }
            composition.Move1();
            composition.Move2();
            return(result);
        }
コード例 #3
0
        /// <summary>
        /// Compose two FSTs.
        /// This function copies the composition of two given FSTs.
        /// That causes expansion (storing all arcs explicitly).
        /// </summary>
        public static void fst_expand_composition(IGenericFst outf, OcroFST f1, OcroFST f2)
        {
            CompositionFst composition = FstFactory.MakeCompositionFst(f1, f2);

            try
            {
                fst_copy(outf, composition);
            }
            catch (Exception ex)
            {
                composition.Move1();
                composition.Move2();
                throw ex;
            }
            composition.Move1();
            composition.Move2();
        }