/** PopulationContainer.h * J Scott Cameron * * Definition of a class that controls a GP Population * for the Genetic Images program. */ #include "operators.h" #include #include using namespace std; class PopulationContainer { public: PopulationContainer(); /* updates all the bitmaps for the population */ void UpdateMaps(); /* returns a handle to a bitmap using the given node of * the dimensions given. * c_x, c_y are usually set to 0 (center of bitmap) * scales are usually set to 1 */ HBITMAP getBitmapFromNode(Node* node,int width, int height, double c_x, double c_y, double xscale, double yscale); /* Draws the bitmap to the given device context at point * xStart, yStart */ void DrawBitmap(HDC hdc, HBITMAP hBitmap, int xStart, int yStart); /* returns the node of the given index */ Node* getNode(int); /* creates a new population by mutating the node with * given index */ void mutatePop(int); /* resets the population with a new random population */ void reset(); /* initializes the population with randomly generated nodes*/ void init(); /* pointer to the Population class */ Population* P; /* a vector of all the bitmaps */ vector bitmaps; };