00001 /* 00002 *==================================================================== 00003 * HISTORY: 00004 * ------- 00005 * $Log: NeuralNetworkBuilder.h,v $ 00006 * Revision 1.1 2008/08/23 14:28:48 samit_ahlawat 00007 * Feed forward neural network library 00008 * 00009 * Revision 1.1 2007/11/06 10:06:30 samit_ahlawat 00010 * Checking in first version of basic neural net infrastructure 00011 * 00012 * 00013 * ID: 00014 * -- 00015 * static const char *CvsId = "@(#)$Id: NeuralNetworkBuilder.h,v 1.1 2008/08/23 14:28:48 samit_ahlawat Exp $"; 00016 *==================================================================== 00017 */ 00018 00019 #ifndef _AIMAGIK_NEURAL_NETWORK_BUILDER_H_ 00020 #define _AIMAGIK_NEURAL_NETWORK_BUILDER_H_ 00021 00022 #include <vector> 00023 #include <iostream> 00024 #include <stdexcept> 00025 00026 class NeuralNetwork; 00027 class Neuron; 00028 00038 class NeuralNetworkBuilder 00039 { 00040 friend class NeuralNetwork; 00041 private: 00043 NeuralNetwork* pNetwork; 00044 00045 protected: 00046 NeuralNetworkBuilder(NeuralNetwork* network); 00047 NeuralNetworkBuilder(const NeuralNetworkBuilder& builder); 00048 NeuralNetworkBuilder& operator= (const NeuralNetworkBuilder& builder); 00049 00050 public: 00053 void Deserialize(std::istream& in) throw (std::domain_error); 00055 void Serialize(std::ostream& os) const; 00056 00057 void DeserializeData(std::istream& is) throw (std::domain_error); 00058 00059 void SerializeData(std::ostream& is) const; 00060 00061 NeuralNetwork* GetNetwork() { return pNetwork; } 00062 00063 ~NeuralNetworkBuilder(); 00064 }; 00065 00066 #endif // _AIMAGIK_NEURAL_NETWORK_BUILDER_H_ 00067