00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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 ) { };
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