- 3.0.2 core module.
OutputMatrix.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 OUTPUT_DIM, class SCALAR = double>
12 class OutputMatrix : public Eigen::Matrix<SCALAR, OUTPUT_DIM, OUTPUT_DIM>
13 {
14 public:
15  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
16 
17  typedef Eigen::Matrix<SCALAR, OUTPUT_DIM, OUTPUT_DIM> Base;
18 
20  virtual ~OutputMatrix() {}
22  template <typename OtherDerived>
23  OutputMatrix(const Eigen::MatrixBase<OtherDerived>& other) : Base(other)
24  {
25  }
27  template <typename OtherDerived>
28  OutputMatrix& 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 */
virtual ~OutputMatrix()
Definition: OutputMatrix.h:20
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef Eigen::Matrix< SCALAR, OUTPUT_DIM, OUTPUT_DIM > Base
Definition: OutputMatrix.h:17
Definition: OutputMatrix.h:12
OutputMatrix(const Eigen::MatrixBase< OtherDerived > &other)
This constructor allows you to construct MyVectorType from Eigen expressions.
Definition: OutputMatrix.h:23
OutputMatrix & operator=(const Eigen::MatrixBase< OtherDerived > &other)
This method allows you to assign Eigen expressions to MyVectorType.
Definition: OutputMatrix.h:28
Base & toImplementation()
get underlying Eigen type
Definition: OutputMatrix.h:34
OutputMatrix()
Definition: OutputMatrix.h:19
const Base & toImplementation() const
get const underlying Eigen type
Definition: OutputMatrix.h:36