12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- #ifndef SIMLOOP__HPP
- #define SIMLOOP__HPP
- #include <vector>
- #include <string>
- #include "libcsim.hpp"
- using namespace std;
- // forward declaration
- class SimElement;
- class Connection; //! forward declaration
- class connection; //! forward declaration --> loeschen geht noch nicht??
- class input; //! forward declaration
- class AbstractNormalize; //! forward declaration
- class learning; // forward declaration for learning pointer in class connection
- class veclearning; // forward declaration for learning pointer in class connection
- class layer;
- /*! \brief SimLoop enthält gemeinsame Informationen, die von allen SimElements genutzt werden
- *
- * außerdem werden alle SimElements in der SimLoop registriert,
- * so dass die SimLoop
- * die proceede und prepare-Methoden aller SimElements aufrufen kann
- */
- class SimLoop
- {
- private:
- int MacroTimeStep;
- float DeltaT;
- string DataDirectory;
- unsigned int ElementCounter;
- vector<SimElement*>* SimElementList;
- TConnectionList* ConnectionList;
- TNormList* NormList;
- int MaximumDelay; //!< the real maximum delay of the simulation
- public:
- SimLoop(int _MacroTimeStep=1000, float _DeltaT=0.25);
- ~SimLoop();
- void deleteAllSimElements();
- int AddSimElement(SimElement*);
- int AddSimElement(layer*);
- int AddSimElement(Connection*);
- int AddSimElement(AbstractNormalize*);
- void Hallo();
- void SetDataDirectory(const char* _dirname = "/home/frank/data/sim/csim/");
- void SetDataDirectory_(const char* _dirname = "/home/frank/data/sim/csim/");
- string GetDataDirectory();
- int GetMacroTimeStep();
- int SetDeltaT(float _dt);
- float GetDeltaT();
- void SaveSimInfo();
- void SetSimTag(const char* _tag);
- void TurnOffLearning();
- void TurnOnLearning();
- void SaveLearningWeights(int TrialNr);
- void CropLearningWeights(float threshold);
- void SetMaximumDelay(int newmax);
- int GetMaximumDelay();
- int proceede(int TotalTime=0);
- int prepare(int mst=0);
- int reset(int t);
- void SetParameter(ParaType p, double value);
- void ProcessSignalUsr1();
- void showMemoryConsumption();
- };
- //////////////////////////////////////////////////
- /*! \brief erzeugt die globale SimLoop
- */
- SimLoop* InitLibCSim(int _MacroTimeStep=1000, float _DeltaT=0.25);
- /*! \brief liefert einen Zeiger auf die globale SimLoop
- */
- SimLoop* GetGlobalSimLoop();
- /*! \brief löscht die globale SimLoop
- */
- void deleteGlobalSimLoop();
- #endif // #ifndef SIMLOOP__HPP
|