I have a piece of C++ code (main.cpp) which uses armadillo to prepare a very LARGE sparse matrix and its r.h.s, to be solved like x = Ab. Problem: In armadillo, no parallel-iterative-linear sparse solver exists. And I am thinking to consider PETSc, which has many capable solvers. But, I have no clue how to ..

#### Category : armadillo

int main() { arma::mat dataset; arma::field<std::string> headers; dataset.load(arma::csv_name("house_to_rent.csv", headers)); return 0; } When running this I am getting the error csv_name is not a member of arma. Have I messed up installation somewhere? OS: Ubuntu 20.04 Editor: VSCode Source: Windows Que..

I’m doing some physics simulation in C++ using Armadillo. I need to calculate a product looking like: Q = R * exp(neg_i*Lambda*t) * R.t() * Q Where Q,R are cx_mat class of the same size, Lambda is a mat class of the same size as Q,R and is diagonal, neg_i is -i the complex number ..

I just updated an XCode project from macOS 10.14 to 11.0. Unfortunately, I forgot I also needed to run it on another 10.14 machine, so I went back to change the settings to compile for 10.14, but now it routinely fails with Undefined symbols for architecture x86_64: "_zgeev_", referenced from: void arma::lapack::cx_geev<std::__1::complex<double> >(char*, char*, int*, ..

Consider this R function: r_abs <- function(x,y,z){ 2 * abs((x >= y) – z) } And those 2 RcppArmadillo equivalents: // [[Rcpp::depends(RcppArmadillo)]] // [[Rcpp::depends(RcppProgress)]] #include <RcppArmadillo.h> #include <string> #include <progress.hpp> using namespace arma; // [[Rcpp::export]] double arma_abs(const double &x, const double &y, const double &z) { return 2 * abs((x >= y) – z); } ..

As the title mentions my goal is to use std::nth_element on a Armadillo-Matrix which contains a set of N points in d dimensions, i.e. a Nxd matrix. The rows represent a d-dimensional point. The comparison of two rows should be done along a fixed dimension, i.e. row(i) < row(j) iff A(i, s) < A(j,s) (comparing ..

I have a package on CRAN called ‘metapack’ and received a message from Professor Ripley that the error must be resolved for the package to be safely retained in CRAN. I’ve encountered this error on R-CMD-check on GitHub but cannot replicate it on any of my local machines to save my life. The reproducible code ..

I have a very simple task in an Armadillo 10×10 matrix. The task is to change the values of the columns 1,3,4 and 9 to sqrt(2). I already done the task using (B is only ones) B.cols(columns) *= sqrt(2); I did this for every column and worked. The problem here is that reading the documentation ..

I am new to C++ but I am working with R and RcppArmadillo and my goal is to divide element-wise 2 sparse matrices. I have read in the documentation of Armadillo that the operator is / but when I source my code with sourceCpp I am getting this error: no match for ‘operator/’ (operand types ..

How do I convert a 2d C++ array into an Armadillo matrix for matrix operations. So from double a[10][20]; to arma::mat A; Source: Windows Que..

## Recent Comments