#ifndef TYPEDEFS__HPP #define TYPEDEFS__HPP #include #include using namespace std; // global typedefs class VecConnection; typedef vector TVecConnectionList; class VecConnection; typedef vector TVConList; typedef TVConList::iterator VConIterator; class VecNormalize; typedef vector TVNormList; typedef TVNormList::iterator VNormIter; class layer; typedef vector TLayerList; class Connection; typedef vector TConnectionList; class connection; typedef vector TconnectionList; //! --> ToDo bereinigen, so dass hier nur noch Connection steht typedef TConnectionList::iterator ConIter; typedef TConnectionList::iterator ConnectionIterator; typedef TconnectionList::iterator connectionIterator; class layer; typedef vector TLayerList; typedef TLayerList::iterator LayerIterator; class input; typedef vector TInputList; typedef TInputList::iterator InputIterator; class AbstractNormalize; typedef vector TNormList; typedef TNormList::iterator NormIter; #ifdef MEMSAVE #define NSYNAPSES_INT #define NNEURONS_SHORT #define DELAYS_CHAR #endif #ifdef NSYNAPSES_INT typedef int T_NSynapses; const T_NSynapses NSYNAPSES_MAX = INT_MAX; #else typedef long T_NSynapses; const T_NSynapses NSYNAPSES_MAX = LONG_MAX; #endif #ifdef NNEURONS_SHORT typedef short T_NNeurons; const T_NNeurons NNEURONS_MAX = SHRT_MAX; #else typedef int T_NNeurons; const T_NNeurons NNEURONS_MAX = INT_MAX; #endif #ifdef DELAYS_CHAR typedef char T_Delays; const T_Delays DELAYS_MAX=CHAR_MAX; #else typedef int T_Delays; const T_Delays DELAYS_MAX=INT_MAX; #endif const T_Delays DMAX = 120; inline bool compiledWithDelaysChar() { #ifdef DELAYS_CHAR return true; #else return false; #endif } inline bool compiledWithSynapsesInt() { #ifdef NSYNAPSES_INT return true; #else return false; #endif } inline bool compiledWithNNeuronsShort() { #ifdef NNEURONS_SHORT return true; #else return false; #endif } inline bool compiledWithLowMemConfig() { return compiledWithNNeuronsShort() || compiledWithSynapsesInt() || compiledWithDelaysChar(); } #endif