00001 /*************************************************************************** 00002 * Copyright (C) 2005-2011 LpzRobots development team * 00003 * Georg Martius <georg dot martius at web dot de> * 00004 * Frank Guettler <guettler at informatik dot uni-leipzig dot de * 00005 * Frank Hesse <frank at nld dot ds dot mpg dot de> * 00006 * Ralf Der <ralfder at mis dot mpg dot de> * 00007 * * 00008 * This program is free software; you can redistribute it and/or modify * 00009 * it under the terms of the GNU General Public License as published by * 00010 * the Free Software Foundation; either version 2 of the License, or * 00011 * (at your option) any later version. * 00012 * * 00013 * This program is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00016 * GNU General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU General Public License * 00019 * along with this program; if not, write to the * 00020 * Free Software Foundation, Inc., * 00021 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00022 * * 00023 ***************************************************************************/ 00024 #ifndef __INVERTABLENN_H 00025 #define __INVERTABLENN_H 00026 00027 #include "matrix.h" 00028 #include "abstractmodel.h" 00029 00030 /** abstract class (interface) for invertable models. 00031 Invertable models provide a linear response function (jacobian) 00032 */ 00033 class InvertableModel : public AbstractModel { 00034 public: 00035 // 20110317, guettler: disabled default constructor since it is not needed and would cause difficulties 00036 //InvertableModel() {}; 00037 InvertableModel(const std::string& name, const std::string& revision) 00038 : AbstractModel(name, revision) {} 00039 virtual ~InvertableModel(){}; 00040 00041 /** calculates the partial derivative of the of the output with repect to the input (Jacobi matrix). 00042 00043 \f[J_{ij} = \frac{\partial output_i}{\partial input_j}\f] 00044 00045 The result is a matrix of dimension (outputdim x inputdim) 00046 */ 00047 virtual const matrix::Matrix response(const matrix::Matrix& input) const = 0; 00048 00049 /** calculates the input shift v to given output shift xsi via pseudo inversion. 00050 00051 \f[o+\xi = \pi(i+v)\f] 00052 00053 The result is a vector of dimension inputdim 00054 */ 00055 virtual const matrix::Matrix inversion(const matrix::Matrix& input, const matrix::Matrix& xsi) const = 0; 00056 00057 00058 }; 00059 00060 00061 #endif