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 resolved to use armadillo for this. I understand how to initialize arma::mat using vectors, but can I use arrays to do so? I understand not as I don't see any mention in the documentation. I am trying to avoid the use of vectors for internal design reasons. I tried manually initializing each element using sample arrays (as a dumb but starting point). Something like the following code wouldn't work.
using namespace std;
using namespace arma;
mat A(SIZE, 1), B(SIZE, 1);
for(int i = 0; i < SIZE; i++)
{
A << v[i] << endr;
B << c[i] << endr;
}
cout << "A: " << endl;
A.print();
cout << "B: " << endl;
B.print();
For the input arrays v = {1, 2, 0, -1, .9} and c = {0, .5, 1, -2, -5}. The output will be:
A:
0
B:
-5.0000
which is understandable. Any work around for initializing arma::mat or arma::colvector with arrays? Thanks in advance!