armadillo Questions

2

Solved

I am new to using armadillo, and could not get the following in spite of trying / searching quite a bit. There are two huge (dynamic) arrays (not vectors) that I need to perform correlation on. I ...
Pinhead asked 14/10, 2013 at 22:10

4

I did a comparison between blitz++, armadillo, boost::MultiArray with the following code (borrowed from an old post) #include <iostream> using namespace std; #include <windows.h> #defi...

2

Given vector<vector<double > > A_STL, I want it to get converted into arma::mat A.
Monotheism asked 2/6, 2015 at 9:51

2

I am trying to call R function optim() in Rcpp. I saw an example in Calling R's optim function from within C++ using Rcpp, but I am unable to modify it correctly for my use case. Basically, the...
Grassi asked 19/1, 2018 at 19:18

3

Solved

Is it possible to run armadillos calculations using GPU? Is there any way to use the GPU blas libraries (for example cuBLAS) with armadillo? Just a note, I am totally new to GPU programming.
Barrio asked 1/8, 2013 at 1:26

1

Solved

The title summarizes the goal that is more exactly to dynamically retrieve the number of dimensions of MATLAB arrays passed to armadillo matrices. I would like to change the second and third argume...
Embolic asked 24/1, 2021 at 7:38

3

Solved

Just for the purpose of working on my C++ / Rcpp programming, I took a shot at implementing a (sample) standard deviation function: #include <Rcpp.h> #include <vector> #include <cma...
Benignity asked 16/6, 2014 at 22:33

1

Solved

I am trying to use the SparseLU solver from armadillo (http://arma.sourceforge.net/docs.html#spsolve) through RcppArmadillo: #define ARMA_USE_SUPERLU // [Rcpp::depends(RcppArmadillo)] #include &lt...
Seventieth asked 29/3, 2020 at 7:36

5

I'm using gdb to debug my c++ program. I'm using the armadillo numerical library to define my matrices. I have an armadillo matrix defined like so: mat A = randu<mat>(5,5); Is it possible ...
Ashford asked 29/2, 2012 at 12:47

1

Solved

I have a function within which I want to convert an Eigen::MatrixXd object to arma::mat. I am aware of this question but I can't seem to be able to correct the behavior that I'm getting. Calling ...
Deil asked 30/9, 2019 at 22:28

1

Solved

I'm creating a R package that contains Rcpp functions depending on RcppArmadillo, so I first generate the package skeleton by RcppArmadillo.package.skeleton. However, when I roxygenize my package, ...
Jablonski asked 6/12, 2018 at 0:12

0

My mac's R is linked with openblas. When I look at the "% CPU" usage while performing the sparse-sparse multiplication in R or in Rcpp using Armadillo, it doesn't seem like multithreading is being ...
Copalite asked 7/10, 2018 at 23:50

1

I'm very confused with the issue. The code I am running is: double dotProduct = dot(A, B); std::cout << dotProduct << std::endl; theta = acos(dotProduct); std::cout << theta <...
Campbellbannerman asked 2/9, 2018 at 14:54

1

My task it to rewrite a R function in C++ to accelerate the while loops. All R codes has been rewritten in the help of Rcpp and Armadillo except the .Fortran(). I try to use Rinside to at first and...
Cawley asked 14/7, 2015 at 2:49

1

Solved

I have a project which involves a lot of permutations on 3D arrays ( arma::Cube<cx_double>). In particular, the required permutation is the interchange of columns by slices. In Matlab this is...
Holland asked 14/8, 2018 at 13:9

2

Solved

I'm trying to use ifelse() command of Rcpp sugar with arma::vec. The code fails with error 'ifelse' was not declared in this scope I could not find a solution. A simple example code (resulted wi...
Sleigh asked 27/7, 2018 at 6:42

1

Solved

I am trying to get a Rcpp version of pmvnorm to work at least as fast as mvtnorm::pmvnorm in R. I have found https://github.com/zhanxw/libMvtnorm and created a Rcpp skeleton package with the rele...
Erbium asked 11/7, 2018 at 16:10

1

Solved

For example, if I have vec a(3, fill::randu); vec b(5, fill::randu); How can I get a new vector c of size 8, where the first three elements are from a and the rest from b?
Mefford asked 22/5, 2018 at 13:13

2

Solved

With RcppArmadillo the conversion from R to Rcpp with arma::vec is just as easy as with Rcpp and NumericVector. My project utilizes RcppArmadillo. I'm unsure what to use, NumericVector or arma::v...
Clothespress asked 4/5, 2018 at 8:8

2

Solved

How can I convert from an Armadillo Matrix to an Eigen MatrixXd and vice versa? I have nu as an arma::vec of size N, z as arma::mat of dimension N x 3. I want to compute a matrix P such as the ent...
Squalene asked 12/10, 2017 at 2:40

2

In my code I have loop in which I construct and over determined linear system and try to solve it: #pragma omp parallel for for (int i = 0; i < n[0]+1; i++) { for (int j = 0; j < n[1]+1; j+...
Demisemiquaver asked 5/5, 2015 at 21:5

1

Solved

I'm using the Armadillo Cpp code for matrix algebra. I have an Eigenvector matrix E that I want to sort by its eigenvalues in a vector d. mat E; vec d; eig_sym(d,E,Rxx); // Sort indices of eigne...
Exotoxin asked 18/9, 2017 at 9:57

1

Solved

I have several processes, each computing its own matrix. Finally, I want them to send their solved matrices to the root process, which will literally join them into one big matrix and output this s...
Trueblood asked 3/4, 2015 at 16:35

1

Solved

Following on this question, I am trying to understand how to efficiently update a subset of a Rccp::NumericMatrix data type. I have the following scenario: Rcpp::NumericMatrix m of 5 x 5 that ne...
Appleby asked 14/5, 2017 at 9:32

3

I'm searching for a way to find the index corresponding to the maximum of each column. My goal is to avoid loops and find a Matlabic solution using vectorized armadillo functions. This can easily...
Clyve asked 4/11, 2015 at 8:50

© 2022 - 2024 — McMap. All rights reserved.