Change MathematicalProgram::x_initial_guess_ from Eigen::VectorXd to std::vector<double> #22203
Labels
component: mathematical program
Formulating and solving mathematical programs; our autodiff and symbolic libraries
type: feature request
When we need to push new entries to an array, using std::vector is much faster than Eigen::Vector.
Currently
MathematicalProgram::x_initial_guess_
has the type ofEigen::VectorXd
, and we often callconservativeResize
on this vector, which is slow. I think it is better to change its type tostd::vector<double>
. And the return type of its getter function will be changed fromEigen::VectorXd
toEigen::Map<const Eigen::VectorXd>
@jwnimmer-tri WDYT?
The text was updated successfully, but these errors were encountered: