### Fix and test the inclusion problem of both fast and rt.

`Add a unittest showing the problem with classical use of the library.`
parent b08d57dd
 ... ... @@ -19,6 +19,8 @@ #ifndef __eiquadprog_rt_hxx__ #define __eiquadprog_rt_hxx__ #include "eiquadprog/eiquadprog-utils.hxx" namespace eiquadprog { namespace solvers { ... ... @@ -182,15 +184,6 @@ void RtEiquadprog::delete_constraint(typename RtMatrixX } } template void print_vector(const char* name, Eigen::MatrixBase& x, int n) { // std::cerr << name << x.transpose() << std::endl; } template void print_matrix(const char* name, Eigen::MatrixBase& x, int n) { // std::cerr << name << std::endl << x << std::endl; } template RtEiquadprog_status RtEiquadprog::solve_quadprog( const typename RtMatrixX::d& Hess, const typename RtVectorX::d& g0, ... ...
 #ifndef EIQUADPROG_UTILS_HPP_ #define EIQUADPROG_UTILS_HPP_ /// Compute sqrt(a^2 + b^2) template inline Scalar distance(Scalar a, Scalar b) { Scalar a1, b1, t; a1 = std::abs(a); b1 = std::abs(b); if (a1 > b1) { t = (b1 / a1); return a1 * std::sqrt(1.0 + t * t); } else if (b1 > a1) { t = (a1 / b1); return b1 * std::sqrt(1.0 + t * t); } return a1 * std::sqrt(2.0); } template void print_vector(const char* name, Eigen::MatrixBase& x, int n) { // std::cerr << name << x.transpose() << std::endl; } template void print_matrix(const char* name, Eigen::MatrixBase& x, int n) { // std::cerr << name << std::endl << x << std::endl; } #endif