- 3.0.2 core module.
StateControlMatrix.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 StateControlMatrix : public Eigen::Matrix<SCALAR, STATE_DIM, CONTROL_DIM>
13 {
14 public:
15  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
16 
17  typedef Eigen::Matrix<SCALAR, STATE_DIM, CONTROL_DIM> Base;
18 
20  virtual ~StateControlMatrix() {}
22  template <typename OtherDerived>
23  StateControlMatrix(const Eigen::MatrixBase<OtherDerived>& other) : Base(other)
24  {
25  }
27  template <typename OtherDerived>
28  StateControlMatrix& operator=(const Eigen::MatrixBase<OtherDerived>& other)
29  {
30  this->Base::operator=(other);
31  return *this;
32  }
34  Base& toImplementation() { return *this; }
36  const Base& toImplementation() const { return *this; }
37 };
38 
39 } /* namespace core */
40 } /* namespace ct */
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef Eigen::Matrix< SCALAR, STATE_DIM, CONTROL_DIM > Base
Definition: StateControlMatrix.h:17
virtual ~StateControlMatrix()
Definition: StateControlMatrix.h:20
StateControlMatrix(const Eigen::MatrixBase< OtherDerived > &other)
This constructor allows you to construct MyVectorType from Eigen expressions.
Definition: StateControlMatrix.h:23
StateControlMatrix & operator=(const Eigen::MatrixBase< OtherDerived > &other)
This method allows you to assign Eigen expressions to MyVectorType.
Definition: StateControlMatrix.h:28
const Base & toImplementation() const
get const underlying Eigen type
Definition: StateControlMatrix.h:36
StateControlMatrix()
Definition: StateControlMatrix.h:19
Definition: StateControlMatrix.h:12
Base & toImplementation()
get underlying Eigen type
Definition: StateControlMatrix.h:34