So it appears as though armadillo does not have any interpolation capability (at least I can find no reference to it in the documentation). I was wondering if anyone has any suggestions on how best to implement spline and linear interpolation using rowvec's as input and output?
As you already have the source code for the interpolation algorithm, three possible choices come to mind:
Refactor the code to directly use Armadillo classes (eg. matrices and vectors) instead of its own arrays.
Use the code as is, and then set an instance of Armadillo's matrix or vector classes to use the memory of the arrays produced by the interpolation algorithm. See the docs for the advanced Mat constructors.
Slightly modify the existing code by using memory/arrays allocated by Armadillo. The pointer to the memory used by Armadillo matrices and vectors can be easily obtained via the .memptr() function.
Choice 3 is probably the easiest for interfacing with existing code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With