21 template <
class T,
typename SCALAR =
double>
25 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
28 typedef Eigen::Matrix<SCALAR, T::DIM, T::DIM>
matrix_t;
29 typedef std::vector<vector_t, Eigen::aligned_allocator<vector_t>>
vector_array_t;
40 void computeSpline(
const vector_array_t& points)
override { zOholds_ = points; }
44 assert(shotIdx < zOholds_.size());
45 assert(zOholds_[shotIdx] == zOholds_[shotIdx]);
46 return zOholds_[shotIdx];
53 return matrix_t::Identity();
58 return matrix_t::Zero();
64 vector_array_t zOholds_;
66 std::shared_ptr<tpl::TimeGrid<SCALAR>> timeGrid_;
std::vector< vector_t, Eigen::aligned_allocator< vector_t > > vector_array_t
Definition: ZeroOrderHoldSpliner.h:29
void computeSpline(const vector_array_t &points) override
Updates the vector on the shots.
Definition: ZeroOrderHoldSpliner.h:40
matrix_t splineDerivative_q_iplus1(const SCALAR time, const size_t shotIdx) const override
Returns the spline derivative with respect to the control input at shot i+1.
Definition: ZeroOrderHoldSpliner.h:56
Eigen::Matrix< SCALAR, T::DIM, T::DIM > matrix_t
Definition: ZeroOrderHoldSpliner.h:28
The spline implementation for the zero order hold spliner.
Definition: ZeroOrderHoldSpliner.h:22
Abstract base class for the control input splining between the DMS shots.
Definition: SplinerBase.h:20
matrix_t splineDerivative_q_i(const SCALAR time, const size_t shotIdx) const override
Return the spline derivative with respect to the control input at shot i.
Definition: ZeroOrderHoldSpliner.h:51
ZeroOrderHoldSpliner(std::shared_ptr< tpl::TimeGrid< SCALAR >> grid)
Custom constructor.
Definition: ZeroOrderHoldSpliner.h:38
vector_t evalSpline(const SCALAR time, const size_t shotIdx) override
Depending on the spline type, this method evaluates the control input between the shots...
Definition: ZeroOrderHoldSpliner.h:42
CppAD::AD< CppAD::cg::CG< double > > SCALAR
ZeroOrderHoldSpliner()=delete
vector_t splineDerivative_h_i(const SCALAR time, const size_t shotIdx) const override
Returns the spline derivatives with respect to the time segment between the shots.
Definition: ZeroOrderHoldSpliner.h:50
Definition: TimeGrid.h:27
vector_t splineDerivative_t(const SCALAR time, const size_t shotIdx) const override
Returns the spline derivatives with respect to time.
Definition: ZeroOrderHoldSpliner.h:49
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef T vector_t
Definition: ZeroOrderHoldSpliner.h:27
~ZeroOrderHoldSpliner() override=default