00001 /*************************************************************************** 00002 * Copyright (C) 2005 by Robot Group Leipzig * 00003 * martius@informatik.uni-leipzig.de * 00004 * fhesse@informatik.uni-leipzig.de * 00005 * der@informatik.uni-leipzig.de * 00006 * * 00007 * This program is free software; you can redistribute it and/or modify * 00008 * it under the terms of the GNU General Public License as published by * 00009 * the Free Software Foundation; either version 2 of the License, or * 00010 * (at your option) any later version. * 00011 * * 00012 * This program is distributed in the hope that it will be useful, * 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00015 * GNU General Public License for more details. * 00016 * * 00017 * You should have received a copy of the GNU General Public License * 00018 * along with this program; if not, write to the * 00019 * Free Software Foundation, Inc., * 00020 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00021 *************************************************************************** 00022 * * 00023 * DESCRIPTION * 00024 * * 00025 * $Log: invertablemodel.h,v $ 00026 * Revision 1.6 2008/05/02 17:20:04 martius 00027 * *** empty log message *** 00028 * 00029 * Revision 1.5 2007/04/02 15:24:14 der 00030 * inversion 00031 * 00032 * Revision 1.4 2007/02/20 15:41:06 martius 00033 * big model stuff, elman and co 00034 * 00035 * Revision 1.3 2006/08/04 15:16:13 martius 00036 * documentation 00037 * 00038 * Revision 1.2 2006/07/20 17:14:34 martius 00039 * removed std namespace from matrix.h 00040 * storable interface 00041 * abstract model and invertablemodel as superclasses for networks 00042 * 00043 * Revision 1.1 2006/07/18 15:45:40 martius 00044 * invertable models provide the linear response function (jacobian) 00045 * 00046 * * 00047 ***************************************************************************/ 00048 #ifndef __INVERTABLENN_H 00049 #define __INVERTABLENN_H 00050 00051 #include "matrix.h" 00052 #include "abstractmodel.h" 00053 00054 /** abstract class (interface) for invertable models. 00055 Invertable models provide a linear response function (jacobian) 00056 */ 00057 class InvertableModel : public AbstractModel { 00058 public: 00059 InvertableModel() {}; 00060 InvertableModel(const std::string& name, const std::string& revision) 00061 : AbstractModel(name, revision) {} 00062 virtual ~InvertableModel(){}; 00063 00064 /** calculates the partial derivative of the of the output with repect to the input (Jacobi matrix). 00065 00066 \f[J_{ij} = \frac{\partial output_i}{\partial input_j}\f] 00067 00068 The result is a matrix of dimension (outputdim x inputdim) 00069 */ 00070 virtual const matrix::Matrix response(const matrix::Matrix& input) const = 0; 00071 00072 /** calculates the input shift v to given output shift xsi via pseudo inversion. 00073 00074 \f[o+\xi = \pi(i+v)\f] 00075 00076 The result is a vector of dimension inputdim 00077 */ 00078 virtual const matrix::Matrix inversion(const matrix::Matrix& input, const matrix::Matrix& xsi) const = 0; 00079 00080 00081 }; 00082 00083 00084 #endif