TarzaNN
TarzaNN neural network simulator
C:/Users/albertlr/projects/TarzaNN/TarzaNN/PlaneInputWindowSet.h
Go to the documentation of this file.
00001 
00002 #ifndef PlaneInputWindow_H_INCLUDED
00003 #define PlaneInputWindow_H_INCLUDED
00004 
00005 #include "PlaneInputWindow.h"
00006 
00008 
00013 class PlaneInputWindowSet {
00014  public:
00016   PlaneInputWindowSet(int width, int height) {
00017     this->width = width;
00018     this->height = height;
00019     this->data = new PlaneInputWindow[width*height];
00020   }
00021   ~PlaneInputWindowSet() {
00022     delete[] data;
00023   }
00024   
00026   inline PlaneInputWindow& operator()(int col, int row) {
00027     assert(col >= 0 && row >= 0);
00028     assert(col < width && row < height);
00029     return data[col+row*width];
00030   }
00031   
00032  private:
00033   PlaneInputWindow *data;
00034   int width;
00035   int height;
00036 };
00037 #endif /*PlaneInputWindow_H_INCLUDED*/
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines