00001 00006 #ifndef KOHONEN_DRAW_H 00007 #define KOHONEN_DRAW_H 00008 00009 #include "../Kohonen.h" 00010 #include "../Video.h" 00011 #include "../TrainingSet.h" 00012 00013 namespace annie { 00014 00019 class KohonenDraw : public Video::Redrawer { 00020 public: 00021 KohonenDraw(const KohonenNetwork *net) : topology(net->getTopology()), net(net) {} 00022 00024 virtual void draw(); 00025 00030 void drawClusters(); 00031 00032 protected: 00033 const Topology &topology; 00034 const KohonenNetwork *net; 00035 void warn(); 00036 void unWarn(); 00037 void drawPosition(const Vector &v); 00038 void drawPosition(const Neuron &n); 00039 00040 }; 00041 00042 class ExKohonenDraw : public KohonenDraw { 00043 public: 00044 ExKohonenDraw(const KohonenNetwork *net, TrainingSet &inputs) : KohonenDraw(net), inputs(inputs) {} 00045 00047 void drawExamples(); 00048 virtual void draw(); 00049 00054 00055 00056 protected: 00057 TrainingSet &inputs; 00058 }; 00059 00060 } //annie 00061 #endif // _H