forked from nest/nest-simulator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into parrot-multiport
* master: Import GetStatus/SetStatus from the info component, where they were moved in a3ec4d4. Fix the stop condition of process_static_analysis. Added explanation for recursive import code. Moved Get/SetStatus from node to info component of HL API. Added information on steps to execute after creating the release tarball. Validate parameter values in setters of tsodyks synapses Added empty __init__.py to make the lib directory a module. Split Python high-level API into multiple files and made loading of the submodules dynamic Tsodyks synapse model with common properties
- Loading branch information
Showing
23 changed files
with
2,239 additions
and
1,565 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* | ||
* tsodyks_connection_hom.cpp | ||
* | ||
* This file is part of NEST. | ||
* | ||
* Copyright (C) 2004 The NEST Initiative | ||
* | ||
* NEST is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* NEST is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with NEST. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
|
||
#include "tsodyks_connection_hom.h" | ||
#include "network.h" | ||
#include "connector_model.h" | ||
|
||
namespace nest | ||
{ | ||
|
||
// | ||
// Implementation of class TsodyksHomCommonProperties. | ||
// | ||
|
||
TsodyksHomCommonProperties::TsodyksHomCommonProperties() | ||
: CommonPropertiesHomW() | ||
, tau_psc_( 3.0 ) | ||
, tau_fac_( 0.0 ) | ||
, tau_rec_( 800.0 ) | ||
, U_( 0.5 ) | ||
{ | ||
} | ||
|
||
void | ||
TsodyksHomCommonProperties::get_status( DictionaryDatum& d ) const | ||
{ | ||
CommonPropertiesHomW::get_status( d ); | ||
|
||
def< double_t >( d, "U", U_ ); | ||
def< double_t >( d, "tau_psc", tau_psc_ ); | ||
def< double_t >( d, "tau_rec", tau_rec_ ); | ||
def< double_t >( d, "tau_fac", tau_fac_ ); | ||
} | ||
|
||
void | ||
TsodyksHomCommonProperties::set_status( const DictionaryDatum& d, ConnectorModel& cm ) | ||
{ | ||
CommonPropertiesHomW::set_status( d, cm ); | ||
|
||
updateValue< double_t >( d, "U", U_ ); | ||
if ( U_ > 1.0 || U_ < 0.0 ) | ||
throw BadProperty( "U must be in [0,1]." ); | ||
|
||
updateValue< double_t >( d, "tau_psc", tau_psc_ ); | ||
if ( tau_psc_ <= 0.0 ) | ||
throw BadProperty( "tau_psc must be > 0." ); | ||
|
||
updateValue< double_t >( d, "tau_rec", tau_rec_ ); | ||
if ( tau_rec_ <= 0.0 ) | ||
throw BadProperty( "tau_rec must be > 0." ); | ||
|
||
updateValue< double_t >( d, "tau_fac", tau_fac_ ); | ||
if ( tau_fac_ < 0.0 ) | ||
throw BadProperty( "tau_fac must be >= 0." ); | ||
} | ||
|
||
} // of namespace nest |
Oops, something went wrong.