Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

SimpleFastIca.hpp

00001 #ifndef __SimpleFastIca__
00002 #define __SimpleFastIca__
00003 
00028 #include "RealVector.hpp"
00029 
00030 class SimpleFastIca 
00031 {
00032 private:
00033 
00034 RealVector*             wold;
00035 RealVector*             w;
00036 
00037 int                     count;
00038 RealVector*             ev3;                    // cummulate estimation needed in FastICA
00039 
00040 double          epsilon;
00041 
00042 public:
00043 
00044 SimpleFastIca(double eps=1.0e-4){ w=0; wold=0; count=0; epsilon=eps; }
00045 virtual ~SimpleFastIca()
00046  {
00047  if( w != 0 )
00048         { 
00049         delete w;
00050         delete wold;
00051 
00052         delete ev3;
00053         }
00054  }
00055 
00056 virtual RealVector* getW(){return w;}
00057 
00058 // learning
00059 virtual void init(int size);
00060 
00061 virtual void startLearning(){ count=0; ev3->setAll(0.0); } // to use to start a new iteration
00062 virtual void learn(RealVector* sample);
00063 virtual bool endLearning();
00064 
00065 // out
00066 virtual double forward(RealVector* src);                // maximise absolute value of kurtosis
00067 
00068 virtual void output()
00069         {
00070         printf("Single Simple FastICA Unit");
00071         }                               
00072 };
00073 
00074 #endif
SourceForge.net Logo
Restoreinpaint sourceforge project `C++/Java Image Processing, Restoration, Inpainting Project'.

Bernard De Cuyper: Open Project Leader: Concept, design and development.
Bernard De Cuyper & Eddy Fraiha 2002, 2003. Bernard De Cuyper 2004. Open and free, for friendly usage only.
Modifications on Belgium ground of this piece of artistic work, by governement institutions or companies, must be notified to Bernard De Cuyper.
bern_bdc@hotmail.com