Search code examples
xamarin.androidalglib

Error with spline2dbuildbicubic of alglib


I want to make a bicublic 2D spline Interpolation. For that I opted for using the library Alglib. I have two vectors xs and ys and a matrix magnitudes. According to the docs I wrote this (magnitude is a double[N,27]):

   for (int i = 0; i < 27; i++)
 {
  ys[i] = i;
   }
  for (int i = 0; i < N; i++)
 {
    xs[i] = i;
  }

   alglib.spline2dbuildbicubic(xs, ys,magnitudes,N, 27, out f);

I get the exception "alglib+alglibexception: Exception of type 'alglib+alglibexception' was thrown."


Solution

  • You have to write: alglib.spline2dbuildbicubic( ys,xs,magnitudes,N, 27, out f);

    Take a look here.