I need to translate Fortran code (one function) to C++. This Fortran function is wrapped up with R code in R package. I want to use the same wrapper functions, but use C++ instead of Fortran code for the main function. R package and Fortran code are available. C++ code should use Armadillo.
R package: [login to view URL]
in the package wrapper R functions are: ernet.R and alspath.R (folder R) and Fortran function: [login to view URL] (folder src). Attached is the comparson code (with more details) that should yield the same result.