Cypress  1.0
C++ Spiking Neural Network Simulation Framework
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cypress::SynapseBase Class Reference

#include <synapses.hpp>

Inheritance diagram for cypress::SynapseBase:
Inheritance graph
[legend]
Collaboration diagram for cypress::SynapseBase:
Collaboration graph
[legend]

Public Member Functions

 SynapseBase (std::initializer_list< Real > parameters)
 
 SynapseBase (std::vector< Real > parameters)
 
virtual const std::string name () const
 
virtual const std::vector< std::string > & parameter_names () const
 
virtual const std::vector< std::string > & parameter_units () const
 
virtual const std::vector< Real > & parameter_defaults () const
 
virtual bool learning () const
 
const std::vector< Real > & parameters () const
 
void parameters (const std::vector< Real > &params)
 
Optional< size_t > parameter_index (const std::string &name) const
 
void set (size_t idx, Real value)
 
Real operator[] (size_t i) const
 
const Realbegin () const
 
const Realend () const
 
size_t size () const
 
virtual ~SynapseBase ()=default
 

Static Public Member Functions

static std::shared_ptr< SynapseBasemake_shared (SynapseBase &synapse)
 

Protected Member Functions

void check_parameter_size ()
 

Protected Attributes

std::vector< Realm_params
 
bool m_learning = false
 

Constructor & Destructor Documentation

cypress::SynapseBase::SynapseBase ( std::initializer_list< Real parameters)
inline
cypress::SynapseBase::SynapseBase ( std::vector< Real parameters)
inlineexplicit
virtual cypress::SynapseBase::~SynapseBase ( )
virtualdefault

Member Function Documentation

const Real* cypress::SynapseBase::begin ( ) const
inline

Returns an iterator allowing to iterate over the parameter vector.

void cypress::SynapseBase::check_parameter_size ( )
inlineprotected
const Real* cypress::SynapseBase::end ( ) const
inline

Returns an iterator allowing to iterate over the parameter vector.

virtual bool cypress::SynapseBase::learning ( ) const
inlinevirtual
static std::shared_ptr<SynapseBase> cypress::SynapseBase::make_shared ( SynapseBase synapse)
static

Create a shared pointer from a reference. Checks the name of the synapse to create the correct type. This is to avoid creating a copy, which is then of type SynapseBase and member functions pointing to wrong name, parameter_names,...

Parameters
synapseReference to the synapse object to be copied and administered by a shared pointer
Returns
Shared pointer to a copy of synapse
virtual const std::string cypress::SynapseBase::name ( ) const
inlinevirtual
Real cypress::SynapseBase::operator[] ( size_t  i) const
inline

Returns a read-only reference at the i-th element in the parameter vector.

virtual const std::vector<Real>& cypress::SynapseBase::parameter_defaults ( ) const
inlinevirtual

Contains default values for the neuron parameters.

Reimplemented in cypress::TsodyksMarkramMechanism, cypress::SpikePairRuleMultiplicative, cypress::SpikePairRuleAdditive, and cypress::StaticSynapse.

Optional<size_t> cypress::SynapseBase::parameter_index ( const std::string &  name) const
inline

Resolves the given parameter name into a parameter index.

virtual const std::vector<std::string>& cypress::SynapseBase::parameter_names ( ) const
inlinevirtual
virtual const std::vector<std::string>& cypress::SynapseBase::parameter_units ( ) const
inlinevirtual
const std::vector<Real>& cypress::SynapseBase::parameters ( ) const
inline
void cypress::SynapseBase::parameters ( const std::vector< Real > &  params)
inline
void cypress::SynapseBase::set ( size_t  idx,
Real  value 
)
inline

Sets the parameter with the given index to the specified value.

Parameters
idxis the parameter that should be updated.
valueis the value the parameter should be set to.
size_t cypress::SynapseBase::size ( ) const
inline

Returns the size of the parameter vector. Aborts if the population is non-uniform.

Member Data Documentation

bool cypress::SynapseBase::m_learning = false
protected
std::vector<Real> cypress::SynapseBase::m_params
protected

The documentation for this class was generated from the following file: