133 std::ifstream fin (filename.c_str());
135 std::stringstream oss;
136 oss <<
"PatternStimulator:: " 137 <<
"There was a problem opening file " 149 int total_pattern_size = 0;
150 while( !fin.eof() && patterns->size() < maxpat ) {
153 fin.getline (buffer,255);
156 if (line[0] ==
'#')
continue;
158 if ( total_pattern_size > 0 ) {
159 std::stringstream oss;
160 oss <<
"PatternStimulator:: Read pattern " 162 <<
" with pattern size " 163 << total_pattern_size
168 patterns->push_back(pattern);
170 total_pattern_size = 0;
175 std::stringstream iss (line);
183 pattern.push_back( pm ) ;
185 total_pattern_size++;
191 newcurrents =
new AurynState[patterns->size()];
192 for (
unsigned int i = 0 ; i < patterns->size() ; ++i ) {
197 std::stringstream oss;
198 oss <<
"PatternStimulator:: Finished loading " << patterns->size() <<
" patterns";
NeuronID i
Definition: auryn_definitions.h:173
bool localrank(NeuronID i)
Checks if the global NeuronID i is integrated on this MPI rank.
Definition: SpikingGroup.cpp:531
NeuronID global2rank(NeuronID i)
Converts global NeuronID within the SpikingGroup to the local NeuronID on this rank.
Definition: SpikingGroup.h:446
NeuronGroup * dst
Definition: PatternStimulator.h:69
std::vector< pattern_member > type_pattern
Definition: auryn_definitions.h:177
Logger * logger
Global pointer to instance of Logger which needs to be initialized in every simulation main program...
Definition: auryn_global.cpp:36
AurynFloat AurynState
Type for Auryn state variables (default single precision since it needs to be compatible with auryn_v...
Definition: auryn_definitions.h:160
AurynDouble gamma
Definition: auryn_definitions.h:174
void msg(std::string text, LogMessageType type=NOTIFICATION, bool global=false, int line=-1, std::string srcfile="")
Definition: Logger.cpp:74
Struct used to define neuronal assembly patterns in SparseConnection.
Definition: auryn_definitions.h:172
std::string string
Standard library string type which is imported into Auryn namespace.
Definition: auryn_definitions.h:156
unsigned int NeuronID
NeuronID is an unsigned integeger type used to index neurons in Auryn.
Definition: auryn_definitions.h:151