From 715ed1d284b31069c7cbe023e04253e5dc808003 Mon Sep 17 00:00:00 2001 From: ManifoldFR Date: Wed, 16 Oct 2024 15:43:38 +0200 Subject: [PATCH] [gar] lqr-problem : move impl of addParameterization() to hxx file --- gar/include/aligator/gar/lqr-problem.hpp | 9 +-------- gar/include/aligator/gar/lqr-problem.hxx | 10 ++++++++++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/gar/include/aligator/gar/lqr-problem.hpp b/gar/include/aligator/gar/lqr-problem.hpp index 137dbf1e2..6cb17ab13 100644 --- a/gar/include/aligator/gar/lqr-problem.hpp +++ b/gar/include/aligator/gar/lqr-problem.hpp @@ -47,14 +47,7 @@ template struct LQRKnotTpl { LQRKnotTpl(uint nx, uint nu, uint nc) : LQRKnotTpl(nx, nu, nc, nx) {} // reallocates entire buffer for contigousness - inline void addParameterization(uint nth) { - this->nth = nth; - Gth.setZero(nth, nth); - Gx.setZero(nx, nth); - Gu.setZero(nu, nth); - Gv.setZero(nc, nth); - gamma.setZero(nth); - } + void addParameterization(uint nth); }; template struct LQRProblemTpl { diff --git a/gar/include/aligator/gar/lqr-problem.hxx b/gar/include/aligator/gar/lqr-problem.hxx index 19c907e1a..6c1edcc98 100644 --- a/gar/include/aligator/gar/lqr-problem.hxx +++ b/gar/include/aligator/gar/lqr-problem.hxx @@ -33,6 +33,16 @@ LQRKnotTpl::LQRKnotTpl(uint nx, uint nu, uint nc, uint nx2, uint nth) gamma.setZero(); } +template +void LQRKnotTpl::addParameterization(uint nth) { + this->nth = nth; + Gth.setZero(nth, nth); + Gx.setZero(nx, nth); + Gu.setZero(nu, nth); + Gv.setZero(nc, nth); + gamma.setZero(nth); +} + template Scalar LQRProblemTpl::evaluate( const VectorOfVectors &xs, const VectorOfVectors &us,