Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
invertablemodel.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005-2011 LpzRobots development team *
3  * Georg Martius <georg dot martius at web dot de> *
4  * Frank Guettler <guettler at informatik dot uni-leipzig dot de *
5  * Frank Hesse <frank at nld dot ds dot mpg dot de> *
6  * Ralf Der <ralfder at mis dot mpg dot de> *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this program; if not, write to the *
20  * Free Software Foundation, Inc., *
21  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
22  * *
23  ***************************************************************************/
24 #ifndef __INVERTABLENN_H
25 #define __INVERTABLENN_H
26 
27 #include "matrix.h"
28 #include "abstractmodel.h"
29 
30 /** abstract class (interface) for invertable models.
31  Invertable models provide a linear response function (jacobian)
32 */
34  public:
35  // 20110317, guettler: disabled default constructor since it is not needed and would cause difficulties
36  //InvertableModel() {};
37  InvertableModel(const std::string& name, const std::string& revision)
38  : AbstractModel(name, revision) {}
39  virtual ~InvertableModel(){};
40 
41  /** calculates the partial derivative of the of the output with repect to the input (Jacobi matrix).
42 
43  \f[J_{ij} = \frac{\partial output_i}{\partial input_j}\f]
44 
45  The result is a matrix of dimension (outputdim x inputdim)
46  */
47  virtual const matrix::Matrix response(const matrix::Matrix& input) const = 0;
48 
49  /** calculates the input shift v to given output shift xsi via pseudo inversion.
50 
51  \f[o+\xi = \pi(i+v)\f]
52 
53  The result is a vector of dimension inputdim
54  */
55  virtual const matrix::Matrix inversion(const matrix::Matrix& input, const matrix::Matrix& xsi) const = 0;
56 
57 
58 };
59 
60 
61 #endif
Matrix type.
Definition: matrix.h:65
abstract class (interface) for invertable models.
Definition: invertablemodel.h:33
virtual ~InvertableModel()
Definition: invertablemodel.h:39
virtual const matrix::Matrix response(const matrix::Matrix &input) const =0
calculates the partial derivative of the of the output with repect to the input (Jacobi matrix)...
virtual const matrix::Matrix inversion(const matrix::Matrix &input, const matrix::Matrix &xsi) const =0
calculates the input shift v to given output shift xsi via pseudo inversion.
abstract class (interface) for a model that can be used by a controller
Definition: abstractmodel.h:34
InvertableModel(const std::string &name, const std::string &revision)
Definition: invertablemodel.h:37