00001 #ifndef __NEURAL_NETWORK_DRAWER_H 00002 #define __NEURAL_NETWORK_DRAWER_H 00003 00004 #ifdef HAVE_VIEWER 00005 #include <ishtar/services.h> 00006 #include "../libgag/GAG.h" 00007 #include "../controller/nn/FeedForwardNeuralNetwork.h" 00008 00009 namespace Teem 00010 { 00012 class NeuralNetworkDrawer 00013 { 00014 public: 00016 NeuralNetworkDrawer(GAG::GraphicContext *gc, int x, int y, int w, int h, Controller* nn, double colorScale = 2.0); 00018 NeuralNetworkDrawer(GAG::GraphicContext *gc, int x, int y, int w, int h, double colorScale = 2.0); 00019 00021 void drawCell(int cx, int cy, bool round, double color = 0.0); 00022 00023 protected: 00024 GAG::GraphicContext *gc; 00025 00026 int x, y, w, h; 00027 double colorScale; 00028 int cellSize; 00029 00031 void drawFeedForwardNeuralNetwork(FeedForwardNeuralNetwork* ffnn); 00033 void drawRecurrencyFromFeedForwardNeuralNetwork(RecurrentFeedForwardNeuralNetwork* rffnn); 00034 }; 00035 } 00036 00037 #endif 00038 #endif