dirkschumacher / armacmp

🚀 Automatically compile linear algebra R code to C++ with Armadillo

Home Page:https://dirkschumacher.github.io/armacmp/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add `apply`?

dirkschumacher opened this issue · comments

apply(X, 1, fun) => X.each_row(fun)
apply(X, 2, fun) => X.each_col(fun)

But that modifies X in place 🤔

@dirkschumacher how about a loop structure instead?

I think fun here should have decent coverage under the pre-mapping of R functions and the lambda conversion introduced to handle anonymous functions.