C++ dlibc++;如何制作dlib::matrix的std::vector

C++ dlibc++;如何制作dlib::matrix的std::vector,c++,matrix,vector,std,dlib,C++,Matrix,Vector,Std,Dlib,我需要一个std::vector的dlib::matrix,但在编译时我不知道矩阵的大小;文件告诉我: // (Note that if you don't know the dimensionality of your vectors at compile time // you can change the 2 to a 0 and then set the size at runtime) typedef matrix<double,2,1> sample_type; 在??

我需要一个
std::vector
dlib::matrix
,但在编译时我不知道矩阵的大小;文件告诉我:

// (Note that if you don't know the dimensionality of your vectors at compile time
// you can change the 2 to a 0 and then set the size at runtime)
typedef matrix<double,2,1> sample_type;

???

你的问题已经有了答案。使用向量作为

std::vector<matrix<double, 0, 1> v;

std::vector但如果我延迟调整大小…它仍然兼容吗?示例:v.at(0)。设置大小(获取维度(),1);没有了,所以我更改了std::vector中的对象类型。。。
std::vector<matrix<double, 0, 1> v;