robotology / osqp-eigen

Simple Eigen-C++ wrapper for OSQP library
https://robotology.github.io/osqp-eigen/
BSD 3-Clause "New" or "Revised" License
385 stars 114 forks source link

Clarify Data class methods semantics #97

Closed traversaro closed 3 years ago

traversaro commented 3 years ago

Content to be added, opening it just as a remainder.

traversaro commented 3 years ago

This is already documented:

         * @note the elements of the lowerBound and upperBound are not copied inside the library.
         * The user has to guarantee that the lifetime of the objects passed is the same of the
         * OsqpEigen object

I was affected by a bug in which I was passing a temporary Eigen vector to setBounds in https://github.com/robotology/wb-toolbox/pull/209, but apparently this is correctly document, even if a bit surprising, but I guess the copies are avoided for performances reason.