1
我需要std::vector
的dlib::matrix
,但我不知道在编译时的矩阵大小;文档告诉我:DLIB C++如何使一个std ::向量的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
,所以我必须对我的std::vector
设置什么模板参数? 例如(get_dimensionality()
给了我正确的dimensionanlity):
matrix<double,0,1> m;
m.set_size(get_dimensionality(),1);
std::vector<matrix<double,????????,1> v;
v.push_back(m);
什么号码在????????
?
但是如果我调整了后期...它仍然兼容?例如:v.at(0).set_size(get_dimensionality(),1);不再是,所以我改变了std :: vector中的对象类型... –
volperossa