Problem::get* is counter intuitive
Many of the Problem
get functions take a vector reference to fill it up with whatever one is trying to get.
E.g.
void Problem::getCurrentState(Eigen::VectorXs& state)
...
However the first line of many of these get function is an assert on the input vector size, e.g.
void Problem::getCurrentState(Eigen::VectorXs& state)
{
assert(state.size() == getFrameStructureSize() && "Problem::getCurrentState: bad state size");
I think this is counter intuitive as it forces one to call it as :
// I Have to know the size beforehand !
Eigen::VectorXs current_state = Eigen::VectorXs(3,1,0);
// Or call some weird initialization...
current_state = problem.zeroState();
// Or error-prone...
current_state = Eigen::VectorXs(problem.getFrameStructureSize());
problem.getCurrentState(current_state);
while one could expect the following to work :
Eigen::VectorXs current_state;
problem.getCurrentState(current_state); // <-- assert crashes :'(
I do not know how important are all those asserts at that time, but as the functions state get
it should be safe to remove them.