This forum has been archived. All content is frozen. Please use KDE Discuss instead.

matrix storage question

Tags: None
(comma "," separated)
ldiduck
Registered Member
Posts
1
Karma
0
OS

matrix storage question

Thu May 06, 2010 7:20 pm
Is there a way to create a dynamic Matrix where the storage is a vector of pointers to array? The idea is that I already have a number of arrays of Scalar that I want to compose into a matrix to perform linear regression (e.g. to compute the PACF ) I see how to use the Map utility to make a Matrix using and existing array of the form

Scalar buf[rows][cols]

but I really want something like

Scalar * buf[cols]

In other words I specify a number of equal-size column vectors from memory,

Thanks
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: matrix storage question

Thu May 06, 2010 7:33 pm
there is nothing like that in eigen, so you could write you own expression doing what you wanna do. It's not much lines of code.

On the other hand, since you are doing linear regression, the cost of an additional copy of your data to a dense matrix would be negligible.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]