#ifndef PrimitiveSet_h #define PrimitiveSet_h #include #include "Primitive.h" #include "Terminal.h" class PrimitiveSet { friend class Tree; public: PrimitiveSet(void); void addFunction(PrimitiveP functionPrimitive); void addTerminal(PrimitiveP terminalPrimitive); PrimitiveP getRandomTerminal(); PrimitiveP getRandomFunction(); PrimitiveP getRandomPrimitive(); virtual ~PrimitiveSet(void); uint getFunctionSetSize(); uint getTerminalSetSize(); std::vector terminalSet; // actual used terminals std::map mPrimitives_; // map of all registered primitive functions StateP state_; std::map mTypeNames_; private: std::vector functionSet; // actual used functions std::vector primitives; // used functions and terminals }; typedef boost::shared_ptr PrimitiveSetP; #endif