include/ddecluster.h

Go to the documentation of this file.
00001 /********************************************************************************
00002  *  Neural Network Framework.                                                   *
00003  *  Copyright (C) 2005-2008 Gianluca Massera <emmegian@yahoo.it>                *
00004  *                                                                              *
00005  *  This program is free software; you can redistribute it and/or modify        *
00006  *  it under the terms of the GNU General Public License as published by        *
00007  *  the Free Software Foundation; either version 2 of the License, or           *
00008  *  (at your option) any later version.                                         *
00009  *                                                                              *
00010  *  This program is distributed in the hope that it will be useful,             *
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of              *
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               *
00013  *  GNU General Public License for more details.                                *
00014  *                                                                              *
00015  *  You should have received a copy of the GNU General Public License           *
00016  *  along with this program; if not, write to the Free Software                 *
00017  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA  *
00018  ********************************************************************************/
00019 
00020 #ifndef DDECLUSTER_H
00021 #define DDECLUSTER_H
00022 
00026 #include "types.h"
00027 #include "cluster.h"
00028 #include "outputfunction.h"
00029 
00030 namespace nnfw {
00031 
00057 class NNFW_API DDECluster : public Cluster {
00058 public:
00061 
00064     DDECluster( const RealVec& coeff, u_int numNeurons, const char* name = "unnamed" );
00065 
00068     DDECluster( PropertySettings& prop );
00069 
00072     virtual ~DDECluster();
00073 
00075 
00077 
00080     void setCoeff( const RealVec& coef );
00081 
00084     const RealVec& getCoeff() {
00085         return coeff;
00086     };
00087 
00090     bool setCoeff( const Variant& );
00091 
00094     Variant getCoeffP();
00095 
00098     void update();
00099 
00102     void randomize( Real, Real ) { /* Nothing To Do */ };
00103 
00105     virtual DDECluster* clone() const;
00106 
00108 
00109 private:
00111     RealVec coeff;
00113     VectorData< RealVec > ds;
00115     RealVec tmpdata;
00117     RealVec tmpdata2;
00118 
00120     void updateDs();
00122     void breakUpdate();
00123 
00125     void propdefs();
00126 };
00127 
00128 }
00129 
00130 #endif
BerliOS Developer Logo Valid XHTML 1.0 Transitional Valid CSS!