コード例 #1
0
        // temp. for testing
        static void MatrixCompileToFile()
        {
            PatternCollection lPatterns = new PatternCollection();

            if (!lPatterns.Load(@"Patterns/fuseki9.db"))
            {
                Console.WriteLine("ERROR: Unable to load patterns");
                return;
            }

            Console.WriteLine("STATUS: Loaded " + lPatterns.Count + " Patterns.");

            SimpleTimer lTimer = new SimpleTimer();

            Console.WriteLine(lTimer.StartTime.ToString());

            DFAMatrixBuilder lDFAMatrixBuilder = new DFAMatrixBuilder();

            lDFAMatrixBuilder.Add(lPatterns);

            Console.WriteLine(DateTime.Now.ToString());

            lDFAMatrixBuilder.BuildThreaded();

            Console.WriteLine(DateTime.Now.ToString());

            Console.WriteLine("Seconds: " + lTimer.SecondsElapsed.ToString());

            MemFile lMemFile = new MemFile();

            lMemFile.Write(lDFAMatrixBuilder.GetMatrix().ToString());

            lMemFile.SaveFile(@"Patterns/fuseki9.cdb");
        }
コード例 #2
0
        public bool SaveSGFFile(string filename)
        {
            MemFile lMemFile = new MemFile();

            lMemFile.Clear();
            lMemFile.Write(ToString());

            return(lMemFile.SaveFile(filename));
        }
コード例 #3
0
        public bool LoadSGFFromMemory(string pSGF)
        {
            MemFile lMemFile = new MemFile();

            lMemFile.Write(pSGF);
            lMemFile.Reset();

            return(LoadSGFFile(lMemFile));
        }
コード例 #4
0
ファイル: Program.cs プロジェクト: tgiphil/GoTraxx
        // temp. for testing
        static void MatrixCompileToFile()
        {
            PatternCollection lPatterns = new PatternCollection();

            if (!lPatterns.Load(@"Patterns/fuseki9.db"))
            {
                Console.WriteLine("ERROR: Unable to load patterns");
                return;
            }

            Console.WriteLine("STATUS: Loaded " + lPatterns.Count + " Patterns.");

            SimpleTimer lTimer = new SimpleTimer();

            Console.WriteLine(lTimer.StartTime.ToString());

            DFAMatrixBuilder lDFAMatrixBuilder = new DFAMatrixBuilder();

            lDFAMatrixBuilder.Add(lPatterns);

            Console.WriteLine(DateTime.Now.ToString());

            lDFAMatrixBuilder.BuildThreaded();

            Console.WriteLine(DateTime.Now.ToString());

            Console.WriteLine("Seconds: " + lTimer.SecondsElapsed.ToString());

            MemFile lMemFile = new MemFile();

            lMemFile.Write(lDFAMatrixBuilder.GetMatrix().ToString());

            lMemFile.SaveFile(@"Patterns/fuseki9.cdb");
        }
コード例 #5
0
ファイル: SGFCollection.cs プロジェクト: tgiphil/GoTraxx
        public bool SaveSGFFile(string filename)
        {
            MemFile lMemFile = new MemFile();

            lMemFile.Clear();
            lMemFile.Write(ToString());

            return lMemFile.SaveFile(filename);
        }
コード例 #6
0
ファイル: SGFCollection.cs プロジェクト: tgiphil/GoTraxx
        public bool LoadSGFFromMemory(string pSGF)
        {
            MemFile lMemFile = new MemFile();

            lMemFile.Write(pSGF);
            lMemFile.Reset();

            return LoadSGFFile(lMemFile);
        }