- 3.0.2 core module.
FeedbackMatrix.h
Go to the documentation of this file.
1 /**********************************************************************************************************************
2 This file is part of the Control Toolbox (https://github.com/ethz-adrl/control-toolbox), copyright by ETH Zurich.
3 Licensed under the BSD-2 license (see LICENSE file in main directory)
4 **********************************************************************************************************************/
5 
6 #pragma once
7 
8 namespace ct {
9 namespace core {
10 
11 template <size_t STATE_DIM, size_t CONTROL_DIM, class SCALAR = double>
12 class FeedbackMatrix : public Eigen::Matrix<SCALAR, CONTROL_DIM, STATE_DIM>
13 {
14 public:
15  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
16 
18  virtual ~FeedbackMatrix(){};
19 
20  typedef Eigen::Matrix<SCALAR, CONTROL_DIM, STATE_DIM> Base;
21 
23  template <typename OtherDerived>
24  FeedbackMatrix(const Eigen::MatrixBase<OtherDerived>& other) : Base(other)
25  {
26  }
27 
29  template <typename OtherDerived>
30  FeedbackMatrix& operator=(const Eigen::MatrixBase<OtherDerived>& other)
31  {
32  this->Base::operator=(other);
33  return *this;
34  }
35 
37  Base& toImplementation() { return *this; }
39  const Base& toImplementation() const { return *this; }
40 };
41 
42 } /* namespace core */
43 } /* namespace ct */
FeedbackMatrix(const Eigen::MatrixBase< OtherDerived > &other)
This constructor allows you to construct MyVectorType from Eigen expressions.
Definition: FeedbackMatrix.h:24
FeedbackMatrix & operator=(const Eigen::MatrixBase< OtherDerived > &other)
This method allows you to assign Eigen expressions to MyVectorType.
Definition: FeedbackMatrix.h:30
Eigen::Matrix< SCALAR, CONTROL_DIM, STATE_DIM > Base
Definition: FeedbackMatrix.h:18
virtual ~FeedbackMatrix()
Definition: FeedbackMatrix.h:18
Definition: FeedbackMatrix.h:12
const Base & toImplementation() const
get const underlying Eigen type
Definition: FeedbackMatrix.h:39
Base & toImplementation()
get underlying Eigen type
Definition: FeedbackMatrix.h:37
EIGEN_MAKE_ALIGNED_OPERATOR_NEW FeedbackMatrix()
Definition: FeedbackMatrix.h:17