GCOP
1.0
|
00001 #ifndef GCOP_RNLQCOST_H 00002 #define GCOP_RNLQCOST_H 00003 00004 #include "lqcost.h" 00005 #include "rn.h" 00006 #include "system.h" 00007 00008 namespace gcop { 00009 00010 using namespace Eigen; 00011 00015 template <int _nx = Dynamic, 00016 int _nu = Dynamic, 00017 int _np = Dynamic, 00018 int _ng = Dynamic> class RnLqCost : 00019 public LqCost< Matrix<double, _nx, 1>, _nx, _nu, _np, _ng> { 00020 00021 typedef Matrix<double, _nx, 1> Vectornd; 00022 typedef Matrix<double, _nu, 1> Vectorcd; 00023 typedef Matrix<double, _np, 1> Vectormd; 00024 00025 00026 public: 00034 RnLqCost(System<Vectornd, _nx, _nu, _np> &sys, double tf, const Vectornd &xf, bool diag = true); 00035 00036 }; 00037 00038 template <int _nx, int _nu, int _np, int _ng> 00039 RnLqCost<_nx, _nu, _np, _ng>::RnLqCost(System<Vectornd, _nx, _nu, _np> &sys, 00040 double tf, 00041 const Matrix<double, _nx, 1> &xf, 00042 bool diag) : 00043 LqCost<Matrix<double, _nx, 1>, _nx, _nu, _np, _ng>(sys, tf, xf, diag) { 00044 assert(_nx > 0); 00045 assert(_nu >= 0); 00046 } 00047 00048 } 00049 00050 #endif