Questions tagged [armadillo]

Armadillo is a linear algebra library for C++ that makes use of template metaprogramming and delayed evaluation.

Armadillo is an open-source C++ linear algebra library (matrix maths) aiming towards a good balance between speed and ease of use. The syntax is deliberately similar to Matlab.

Integer, floating point and complex numbers are supported, as well as a subset of trigonometric and statistics functions. Various matrix decompositions are provided through optional integration with LAPACK, or one of its high performance drop-in replacements (such as the multi-threaded MKL or ACML libraries).

A delayed evaluation approach is employed (during compile time) to combine several operations into one and reduce (or eliminate) the need for temporaries. This is accomplished through recursive templates and template meta-programming.

This library is useful if C++ has been decided as the language of choice, due to speed and/or integration capabilities. It is distributed under a license that is useful in both open-source and commercial contexts.

Armadillo is primarily developed at NICTA (Australia), with contributions from around the world.

Information about Armadillo is available at http://arma.sourceforge.net.

1054 questions
-1
votes
1 answer

how do I make sigpack to find armadillo?

I am currently trying to get sigpack to find armadillo using cmake. Including armadillo does not seem to be a problem, as I can include it using find_package(), but for some reason can sigpack not find it. sigpack is a header only library, for…
arma
  • 11
  • 2
-1
votes
2 answers

Error in using max function with Armadillo sparse matrices

Here is the code that I am getting error(type mismatch) on line no. with max: #include #include #include #include using namespace std; using namespace arma; int main(int argc, char** argv) { umat…
CKM
  • 1,911
  • 2
  • 23
  • 30
-1
votes
1 answer

Can't multiply matrix with armadillo

I can not do matrix multiplications with armadillo. I don't know if there are more features I can't use. So far, I've only been using vectors and dot product with no problem. Basically: #include #include using namespace…
Veiga
  • 212
  • 1
  • 9
-1
votes
2 answers

getting output from a function in c++

I have written the following code using armadillo in c++. However, I cannot get any output (my outputs are cordX and cordY). Is there something wrong with my definition that it cannot give any output? #include #include using…
Sam
  • 939
  • 5
  • 14
  • 41
-1
votes
1 answer

What is the equivalent of Matlab's eigenvalues in an Armadillo

I want to convert a Matlab script to C++, and I used the Armadillo library. I have a dense matrix, which I use eigs() in Matlab to limit the largest magnitude eigenvalues say 3. [V,E] = eigs(B,3,'LA'); However, I found the eigs_sym only support…
cityCoder
  • 65
  • 1
  • 7
-1
votes
1 answer

Armadillo function eig_sym() not working

I am trying to find the eigenvalues of a square matrix using the function eig_sym from the Armadillo linear algebra library: mat STRESS = Mat(3, 3, fill::zeros); vec principals; /** Populate STRESS with symmetric values from a stress…
-1
votes
2 answers

Armadillo join_cols() compile error

I'm trying my hand at doing some simple convex programming with Armadillo, but I might be getting lost in the syntax (or installation). I have the following: int M, N; // these are initialised to > 0 values. vec X; vec B = ones(M); // some…
lsdavies
  • 317
  • 2
  • 13
-1
votes
1 answer

conflict between Armadillo and ofxOpenCv

I am using Armadillo as my matrix library. At the same time, I use OpenFrameworks in order to develop my codes. When I try to use ofxOpenCv together with Armadillo, I get the following errors: /usr/include/armadillo_bits/traits.hpp: At global…
-1
votes
1 answer

barrowing function across c++ libraries (newbie)

I would like to know how one goes about adding functionality from one open source c++ library to another. To make things concrete, here is an example. I really like the "find" function in the Armadillo library and now that i find myself using eigen…
user189035
  • 5,589
  • 13
  • 52
  • 112
-2
votes
1 answer

Rcpp Armadillo package compilation "error: incorrect or unsupported type" when trying to convert a

I have the latest version of R, RCppArmadillo and RStudio installed. I started a brand new R project using Rcpp with Armadillo, and created a single new cpp file called rcpparma_basic.cpp. This is the content of that file: #include…
-2
votes
1 answer

Adding Armadillo C++ to Visual Studio 2010

I am trying to run the example that comes with the library but I have this error fatal error C1189: #error : "* Need a newer compiler *" I am using Visual Studio 2010 and did the following 1- I added the include folder from the library to VS2010…
Karam Abo Ghalieh
  • 428
  • 1
  • 5
  • 19
-2
votes
1 answer

C++ R package error: uploading library

I submitted my package to the CRAN repository. The package was accepted without errors but in the second step of checking the CRAN maintainers reported the following error. Unfortunately I don't understand how I can fix it. In file included from…
-2
votes
1 answer

RcppArmadillo: convert sp_mat to sp_imat

I was reading through Dirk's notes because I was trying to find a solution to passing a sparse matrix to an Rcpp function. My sparse matrix only contains ones and zeros, so I tried the following in order to convert the sp_mat object to an sp_imat…
Cauchy
  • 1,677
  • 2
  • 21
  • 30
-2
votes
1 answer

Most suitable BLAS package for matrix operations

I need the fastest BLAS package for heavy matrix multiplication. I'm currently using the armadillo library included blas. I've done some research and it pointed to OpenBLAS. After some testing it didn't show any improvement. Any thoughts?
Artur D
  • 26
  • 2
-2
votes
1 answer

Generate Random Gamma in Rcpp

I have vector shape and scale parameters to generate numbers from random gamma distribution. I couldn't find a way in R like; lambda<-matrix(rgamma(p,ak,scale=1/bk),p,1) So I'm trying to generate in a loop and it seems I lose time which is the main…
Shin
  • 107
  • 8
1 2 3
70
71