コード例 #1
0
 void LoadAbsoluteLetterModel()
 {
     absoluteLetterGaussianPair = new GaussianPair[26];
     StreamReader reader = new StreamReader("../../../Model/Absolute-General-Letter.txt");
     while (true)
     {
         string line = reader.ReadLine();
         if (line == null) break;
         string[] lineArray = line.Split('\t');
         char letter = lineArray[0][0];
         Gaussian xD = new Gaussian(double.Parse(lineArray[1]), double.Parse(lineArray[2]));
         Gaussian yD = new Gaussian(double.Parse(lineArray[3]), double.Parse(lineArray[4]));
         absoluteLetterGaussianPair[letter - 'a'] = new GaussianPair(xD, yD);
     }
     Console.WriteLine("Load absolute letter GaussianPair : " + absoluteLetterGaussianPair.Length);
     reader.Close();
 }
コード例 #2
0
 public GaussianPair(Gaussian xD2, Gaussian yD2)
 {
     xD = xD2;
     yD = yD2;
 }