Skip to content

Commit

Permalink
[gar] lqr-problem : move impl of addParameterization() to hxx file
Browse files Browse the repository at this point in the history
  • Loading branch information
ManifoldFR committed Oct 16, 2024
1 parent 35ab0e8 commit 715ed1d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
9 changes: 1 addition & 8 deletions gar/include/aligator/gar/lqr-problem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,7 @@ template <typename Scalar> 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 <typename Scalar> struct LQRProblemTpl {
Expand Down
10 changes: 10 additions & 0 deletions gar/include/aligator/gar/lqr-problem.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ LQRKnotTpl<Scalar>::LQRKnotTpl(uint nx, uint nu, uint nc, uint nx2, uint nth)
gamma.setZero();
}

template <typename Scalar>
void LQRKnotTpl<Scalar>::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 <typename Scalar>
Scalar LQRProblemTpl<Scalar>::evaluate(
const VectorOfVectors &xs, const VectorOfVectors &us,
Expand Down

0 comments on commit 715ed1d

Please sign in to comment.