Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added optional RCPP_ARMADILLO_RETURN_COLVEC_AS_VECTOR and co. (#151)
* added optional RCPP_ARMADILLO_RETURN_COLVEC_AS_VECTOR and co. Signed-off-by: Serguei Sokol <sokol at insa-toulouse.fr> * added unit tests for RCPP_ARMADILLO_RETURN_COLVEC_AS_VECTOR and co.; unit_test_setup() is modified to accept character vector as first argument;
- Loading branch information
1 parent
1779ced
commit 41f7930
Showing
6 changed files
with
56 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// [[Rcpp::depends(RcppArmadillo)]] | ||
#define RCPP_ARMADILLO_RETURN_ANYVEC_AS_VECTOR | ||
|
||
#include <RcppArmadillo.h> | ||
|
||
using namespace Rcpp; | ||
|
||
// [[Rcpp::export]] | ||
arma::vec veccany_as_v_test(arma::vec v) { return(v); } | ||
// [[Rcpp::export]] | ||
arma::rowvec vecrany_as_v_test(arma::rowvec v) { return(v); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// [[Rcpp::depends(RcppArmadillo)]] | ||
#define RCPP_ARMADILLO_RETURN_COLVEC_AS_VECTOR | ||
#define RCPP_ARMADILLO_RETURN_ROWVEC_AS_VECTOR | ||
#include <RcppArmadillo.h> | ||
|
||
using namespace Rcpp; | ||
|
||
// [[Rcpp::export]] | ||
arma::vec vecc_as_v_test(arma::vec v) { return(v); } | ||
// [[Rcpp::export]] | ||
arma::rowvec vecr_as_v_test(arma::rowvec v) { return(v); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters