Is there a way to create an array of ublas c_vectors with different sizes?
For example
array[0] would return an ublas::c_vector< double, 3 > (size=3) and array[0](0) would access its first element
array[1] would return an ublas::c_vector< double, 7 > (size=7) and array[1](0) would access its first element
etc
I think you can use
std::vector<boost::any>, and then pushublas::c_vectorof different sizes into it.Elements should be cast back to the appropriate types, using
boost::any_castwhich is custom keyword cast for extracting a value of a given type fromboost::any.You could try
boost::variantas well. Choose whatever suits your need better. Read this before making a decision: