123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- #ifndef TYPEDEFS__HPP
- #define TYPEDEFS__HPP
- #include <limits.h>
- #include <vector>
- using namespace std;
- // global typedefs
- class VecConnection;
- typedef vector<VecConnection*> TVecConnectionList;
- class VecConnection;
- typedef vector<VecConnection*> TVConList;
- typedef TVConList::iterator VConIterator;
- class VecNormalize;
- typedef vector<VecNormalize*> TVNormList;
- typedef TVNormList::iterator VNormIter;
- class layer;
- typedef vector<layer*> TLayerList;
- class Connection;
- typedef vector<Connection*> TConnectionList;
- class connection;
- typedef vector<connection*> 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<layer*> TLayerList;
- typedef TLayerList::iterator LayerIterator;
- class input;
- typedef vector<input*> TInputList;
- typedef TInputList::iterator InputIterator;
- class AbstractNormalize;
- typedef vector<AbstractNormalize*> 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
|