- 3.0.2 core module.
LinearFunctions.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 
10 
11 namespace ct {
12 namespace core {
13 
14 template <int STATE_DIM, int CONTROL_DIM, class SCALAR = double>
16 {
17 public:
18  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
19 
21  {
22  uff_.swap(arg.uff_);
24  k_.swap(arg.k_);
25  }
26 
27  void setZero()
28  {
29  uff_.setZero();
30  deltaUff_.setZero();
31  k_.setZero();
32  }
33 
38 };
39 
40 
41 template <int STATE_DIM, int DIM1, int DIM2, class SCALAR = double>
43 {
44 public:
45  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
46 
48  {
49  uff_.swap(arg.uff_);
51  k_.swap(arg.k_);
52  }
53 
54  void setZero()
55  {
56  uff_.setZero();
57  deltaUff_.setZero();
58  k_.setZero();
59  }
60 
65 };
66 
67 } // core
68 } // ct
TimeArray time_
Definition: LinearFunctions.h:61
An discrete array (vector) of a particular data type.
Definition: DiscreteArray.h:22
void setZero()
Definition: LinearFunctions.h:54
DiscreteArray< ct::core::ControlVector< CONTROL_DIM, SCALAR > > deltaUff_
Definition: LinearFunctions.h:36
DiscreteArray< Eigen::Matrix< SCALAR, DIM1, DIM2 > > uff_
Definition: LinearFunctions.h:62
DiscreteArray< Eigen::Matrix< SCALAR, DIM1, DIM2 > > deltaUff_
Definition: LinearFunctions.h:63
void setZero()
Definition: LinearFunctions.h:27
TimeArray time_
Definition: LinearFunctions.h:34
DiscreteArray< ct::core::ControlVector< CONTROL_DIM, SCALAR > > uff_
Definition: LinearFunctions.h:35
DiscreteArray< Eigen::Matrix< SCALAR, CONTROL_DIM, STATE_DIM > > k_
Definition: LinearFunctions.h:37
EIGEN_MAKE_ALIGNED_OPERATOR_NEW void swap(GeneralLinearFunction &arg)
Definition: LinearFunctions.h:47
DiscreteArray< Eigen::Matrix< SCALAR, DIM1, STATE_DIM > > k_
Definition: LinearFunctions.h:64
Definition: LinearFunctions.h:42
EIGEN_MAKE_ALIGNED_OPERATOR_NEW void swap(LinearFunctionMIMO &arg)
Definition: LinearFunctions.h:20
void swap(DiscreteArray &other)
swaps the content of two arrays
Definition: DiscreteArray.h:84
Definition: LinearFunctions.h:15