Ejemplo n.º 1
0
 public void TestVisvalingam()
 {
     float[,] tss =
     {
         { 0,    1,     2,    3,    4,    5,    6,    7,    8,    9 },
         { 0, 0.1F, -0.1F, 5.0F, 6.0F, 7.0F, 8.1F, 9.0F, 9.0F, 9.0F }
     };
     using (KhivaArray arr = KhivaArray.Create(tss), vis = Dimensionality.Visvalingam(arr, 5))
     {
         float[,] expected =
         {
             { 0,     2,    3,    7,    9 },
             { 0, -0.1F, 5.0F, 9.0F, 9.0F }
         };
         var visArr = vis.GetData2D <float>();
         Assert.AreEqual(expected, visArr);
     }
 }