Example #1
0
string SpikingGroup::get_output_line(NeuronID i)
{
	stringstream oss;

	for ( map<string,auryn_vector_float *>::const_iterator iter = state_vectors.begin() ; 
			iter != state_vectors.end() ;
			++iter ) {
		oss << scientific << auryn_vector_float_get( iter->second, i ) << " ";
	}

	for ( NeuronID k = 0 ; k < pretraces.size() ; k++ ) { 
		// TODO this is actually a bug and only a part of the pretrace gets saved this way
		for ( NeuronID l = 0 ; l < get_locked_range() ; ++l ) {
			NeuronID t = get_locked_range()*(i)+l;
			if ( t < get_size() ) 
				oss << pretraces[k]->get(t) << " ";
			else
				oss << 0.0 << " ";
		}
	}

	for ( NeuronID k = 0 ; k < posttraces.size() ; k++ ) {
		oss << posttraces[k]->get(i) << " ";
	}

	oss << "\n";

	return oss.str();
}
Example #2
0
void STPConnection::push_attributes()
{
	SpikeContainer * spikes = src->get_spikes_immediate();
	for (SpikeContainer::const_iterator spike = spikes->begin() ;
			spike != spikes->end() ; ++spike ) {
		// dynamics 
		NeuronID spk = src->global2rank(*spike);
		double x = auryn_vector_float_get( state_x, spk );
		double u = auryn_vector_float_get( state_u, spk );
		auryn_vector_float_set( state_x, spk, x-u*x );
		auryn_vector_float_set( state_u, spk, u+Ujump*(1-u) );

		// TODO spike translation or introduce local_spikes function in SpikingGroup and implement this there ... (better option)
		src->push_attribute( x*u ); 
	}
}
Example #3
0
AurynFloat TIFGroup::get_bg_current(NeuronID i) {
	if ( localrank(i) )
		return auryn_vector_float_get ( bg_current , global2rank(i) ) ;
	else 
		return 0;
}