private void DrawNetworkAnswer()
 {
     wpfGraphics.Clear();
     Parallel.For(0, 100, x =>
     {
         Parallel.For(0, 100, y =>
         {
             double[,] input  = new double[1, 2];
             input[0, 0]      = (double)(((double)(x - 50)) / 50);
             input[0, 1]      = (double)(((double)(y - 50)) / 50);
             double[,] result = nn.CheckAnswer(input);
             wpfGraphics.SetPixel(x, y, getByte(result[0, 0]), getByte(result[0, 1]), getByte(result[0, 2]));
         });
     });
     wpfGraphics.Draw();
 }
示例#2
0
 private void DrawPoints()
 {
     foreach (Point p in BluePoint)
     {
         wpfGraphics.SetPixel((int)p.X, (int)p.Y, 0, 0, 255);
         wpfGraphics.SetPixel((int)p.X + 1, (int)p.Y, 0, 0, 255);
         wpfGraphics.SetPixel((int)p.X, (int)p.Y + 1, 0, 0, 255);
         wpfGraphics.SetPixel((int)p.X + 1, (int)p.Y + 1, 0, 0, 255);
     }
     foreach (Point p in OrangePoint)
     {
         wpfGraphics.SetPixel((int)p.X, (int)p.Y, 255, 0, 0);
         wpfGraphics.SetPixel((int)p.X + 1, (int)p.Y, 255, 0, 0);
         wpfGraphics.SetPixel((int)p.X, (int)p.Y + 1, 255, 0, 0);
         wpfGraphics.SetPixel((int)p.X + 1, (int)p.Y + 1, 255, 0, 0);
     }
     wpfGraphics.Draw();
 }