public void Add(LearningPlane p)
 {
     _Data.Add(p);
 }
Ejemplo n.º 2
0
 public void SetPlane(int h, int w, LearningPlane p)
 {
     Array.Copy(p.Data, 0, Data, (Width * h + w) * Plane, Plane);
 }
 public void Add(int h, int w, LearningPlane p)
 {
     if (h < 0 || h >= Height || w < 0 || w >= Width)
     {
         return;
     }
     _Data[Width * h + w].Add(p);
 }
Ejemplo n.º 4
0
 public LearningPlane GetPlane(double h, double w)
 {
     int h0 = (int)h;
     int h1 = (int)h + 1;
     int w0 = (int)w;
     int w1 = (int)w + 1;
     var p00 = GetPlane(h0, w0);
     var p10 = GetPlane(h1, w0);
     var p01 = GetPlane(h0, w1);
     var p11 = GetPlane(h1, w1);
     double w00 = ((h1 - h) + (w1 - w)) * 0.25;
     double w10 = ((h - h0) + (w1 - w)) * 0.25;
     double w01 = ((h1 - h) + (w - w0)) * 0.25;
     double w11 = ((h - h0) + (w - w0)) * 0.25;
     LearningPlane p = new LearningPlane(Plane);
     p.Add(p00.Scale(w00), p10.Scale(w10), p01.Scale(w01), p11.Scale(w11));
     return p;
 }