Interpolation using armadillo

So it seems that the armadillo does not have the ability to interpolate (at least I cannot find links to it in the documentation). I was wondering if anyone has any suggestions on how to best implement spline and linear interpolation using rowvec as input and output?

+4
source share
1 answer

Since you already have the source code of the interpolation algorithm, you come up with three possible options:

  • Reorganize your code to use Armadillo classes (such as matrices and vectors) directly instead of your own arrays.

  • Use the code as is, then install an instance of the matrix or Armadillo vector classes to use the memory of arrays created by the interpolation algorithm. See Documents for Advanced Constructors .

  • Modify existing code a bit using memory / arrays allocated by Armadillo. A pointer to the memory used by Armadillo matrices and vectors can be easily obtained using the function . Memptr () .

Choice 3 is probably the easiest to interact with existing code.

+1
source

All Articles