Skip to content

Commit

Permalink
Merge pull request #827 from sdiazpier/sp_check
Browse files Browse the repository at this point in the history
Moved vacant sp elements sanity check to decay function
  • Loading branch information
heplesser committed Oct 13, 2017
2 parents ff33e38 + 63d40c9 commit ab2b396
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions nestkernel/synaptic_element.h
Expand Up @@ -172,7 +172,7 @@ class SynapticElement
int
get_z_vacant() const
{
return std::max( std::floor( z_ ) - z_connected_, 0. );
return std::floor( z_ ) - z_connected_;
}
/*
* Retrieves the current number of synaptic elements bound to a synapse
Expand Down Expand Up @@ -243,7 +243,10 @@ class SynapticElement
void
decay_z_vacant()
{
z_ -= get_z_vacant() * tau_vacant_;
if ( get_z_vacant() > 0 )
{
z_ -= get_z_vacant() * tau_vacant_;
}
}

bool
Expand Down

0 comments on commit ab2b396

Please sign in to comment.