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...
Fibrilla asked 19/1, 2013 at 13:36
2
Given vector<vector<double > > A_STL, I want it to get converted into arma::mat A.
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.
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...
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 <...
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 ...
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 ...
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, ...
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 <...
1
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...
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...
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...
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...
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...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.