Questions tagged [rcppeigen]
28 questions
0
votes
1 answer
LBFGS wrapper in RcppNumerical
I wrote a function to numerically find the quantiles of the following finite mixture of normals
In order to do that I am minimizing . I am using the wrapper of LBFGS from RcppNumerical for the optimization problem. My code is like the…

noirritchandra
- 103
- 9
0
votes
0 answers
Can Eigen vector and matrix classes be used directly within an RcppParallel worker?
I am fitting a statistical model whose likelihood and gradient evaluation depend on many complicated matrix operations, for which the Eigen library is very well-suited. I am working within Rcpp and having great success with RcppEigen. My…

astring
- 1
- 1
0
votes
1 answer
Conversion of Rcpp::NumericMatrix to Eigen::MatrixXd
I am facing a very similar issue to these questions:
convert Rcpp::NumericVector to Eigen::VectorXd
Converting between NumericVector/Matrix and VectorXd/MatrixXd in Rcpp(Eigen) to perform Cholesky solve
I am writing an R-package, that uses the…

sandroh
- 1
- 1
0
votes
1 answer
Error when compiling R packages : Eigen/Core : new: no file or directory
This is my first question on stack ! Hope I follow correctly the guidelines...
Device
Thinkpad series
Manjaro KDE (kernel 5.13)
Fresh R install (4.2)
Fresh Rstudio install
Several packages installed yesterday evening, following approximately this…

user21048379
- 1
- 1
0
votes
0 answers
Change values of non-contiguous entries in a RcppEigen vector
I have a RcppEigen vector and I would like to copy another vector to noncontiguous entries.
For example, using R, I can do
x <- c(0,0,0,1,1,0,1)
y <- rnorm(3)
x[x > 0] <- y
Using Armadillo, I can also do
arma::vec x = {0,0,0,1,1,0,1};
arma::vec…

Ari.stat
- 463
- 4
- 13
0
votes
0 answers
How to define a EIGEN complex map matrix 'Map M'
I am using Eigen. For a real matrix, things work as expected:
// [[Rcpp::export]]
VectorXd matrix_diagonal(Map M)
{
VectorXd RES = M.diagonal();
return RES;
}
For a complex matrix, I am able to get it to work correctly…

mshaffer
- 959
- 1
- 9
- 19
0
votes
0 answers
Long warning list when sourcing c++ file in R
I am having issues in compiling *.cpp files in R using Rcpp.
As an example, I am using the first full example *.cpp file described in https://github.com/yixuan/RcppNumerical.
However, when I try to source it in R, I get the following list of…

CafféSospeso
- 1,101
- 3
- 11
- 28
0
votes
1 answer
Copy SimplicialLLT object in Eigen
I apologies in advance if this is an easy question but I am still learning Eigen.
I am creating two Eigen::SimplicialLLT objects
Eigen::SimplicialLLT > Omegachol1;
Eigen::SimplicialLLT >…

adaien
- 1,932
- 1
- 12
- 26
0
votes
0 answers
RcppEigen install failure on Ubuntu 18 LTS: warning: ignoring attributes on template argument ‘__m128’
I think this question is a duplicate: RcppEigen install failure on Ubuntu 20.04: warning: ignoring attributes on template argument ‘__m128’
However I don't think the solution proposed will work for me as I do not have root access to the machine. I…

Richard Beck
- 1
- 1
0
votes
1 answer
Assigning numeric vector in RcppEigen
I have a cpp file which contains the code as below:
#include
//[[Rcpp::depends(RcppEigen)]]
using namespace Eigen;
//[[Rcpp::export]]
Eigen::VectorXd memory(const double u, const double v, const double w){
Eigen::VectorXd A(3);
…

gultu
- 143
- 10
0
votes
0 answers
RcppEigen functions are very fast with sourceCpp but very slow when compiled as a package
I've written an RcppEigen package with extensive OpenMP usage, all of which is in a single .cpp file.
When I compile the code using Rcpp::sourceCpp() everything is extremely fast -- amazing.
When I compile using devtools::document() and run the same…

zdebruine
- 3,687
- 6
- 31
- 50
0
votes
2 answers
Subsetting Eigen vectors and matrices with a vector of indices
I'm trying to port a working Armadillo function to Eigen and am having an issue with RcppEigen vector and matrix subsetting.
Here's my function:
//[[Rcpp::depends(RcppEigen)]]
#include
using namespace Eigen;
//…

zdebruine
- 3,687
- 6
- 31
- 50
-2
votes
1 answer
Covert src files in R pagate from C++ to R
Updated information
I finally got to make souceCpp works, but still couldn't get the source code in R.
I tried the following:
Rcpp::sourceCpp('src/vinecopulib-interface.cpp')
> try <- Rcpp::sourceCpp('src/vinecopulib-interface.cpp')
>…
user9798936