roboptim / roboptim-core

RobOptim Core Layer: interface and basic mathematical tools
http://www.roboptim.net
GNU Lesser General Public License v3.0
64 stars 35 forks source link

Fix for NumericQuadraticFunction with dynamic allocation checking #91

Closed fdarricau closed 9 years ago

fdarricau commented 9 years ago

Proposing a solution for the issue #90.

Basically using the Sparse way again. It works for both RowMajor and ColMajor modes.

bchretien commented 9 years ago

AFAIK, coeffRef should not be used in the dense case, we use it for the sparse specialization because gradient (gradient_t) is sparse while buffer (vector_t) is dense. I guess we could even use gradient = buffer_.sparseView(); there.

fdarricau commented 9 years ago

I see.

I will update the PR.

bchretien commented 9 years ago

Ok, LGTM, you can rebase the 2 commits.