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

Cannot create std::vector<VectorXd> ?

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

Cannot create std::vector<VectorXd> ?

Tue Jul 15, 2014 10:17 pm
I'm trying to create an STL vector (std::vector) containing variable-length, double-precision Eigen vectors (Eigen::VectorXd). The following code generates a compiler error "Invalid template arguments".
Code: Select all
#include <vector>
#include <Eigen/Core>
int main(int argc, const char* argv[]) {
  vector<Eigen::VectorXd> vec;
}

I understand that there's an issue with constant-sized Eigen matrices/vectors (e.g., Eigen::Vector4f) and the STL classes, but the manual seems to imply that variable-sized matrices/vectors are OK. Am I missing something?

Thanks in advance for the help! (I'm sorry if this is a dumb question, or if it's come up before; I did a few searches on this forum, but nothing relevant came up.)

EDIT: Never mind! Problem solved! User error.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]