Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
d53a6f6
make comments consistent, move doxy to headers where needed, remove r…
jessica-mitchell Jul 20, 2021
eca3cc8
Merge branch 'master' into cleanup-cpp-docs
jessica-mitchell Aug 24, 2021
765ec23
fix typos
jessica-mitchell Aug 24, 2021
2e0e760
revert comments based on review
jessica-mitchell Sep 8, 2021
adc2dff
Merge branch 'master' into cleanup-cpp-docs
jessica-mitchell Dec 9, 2021
bab2ffd
cleanup deprecation to free layer
jessica-mitchell Dec 10, 2021
1d0d613
add notes about comment rules
jessica-mitchell Dec 10, 2021
5d7e343
Merge branch 'master' into cleanup-cpp-docs
jessica-mitchell Feb 8, 2022
4849d0d
g files
jessica-mitchell Feb 8, 2022
7abdc70
from io to nestmodule
jessica-mitchell Feb 10, 2022
d73f35e
move begindocumentation from cpp to h in nestmodule
jessica-mitchell Feb 11, 2022
bb14e2c
fix cpp formatting
jessica-mitchell Feb 21, 2022
eb69995
fix fomratting and move userdocs to h
jessica-mitchell Feb 21, 2022
5ddea5c
Merge branch 'master' into cleanup-cpp-docs
jessica-mitchell Feb 21, 2022
32807c6
Merge branch 'master' into cleanup-cpp-docs
jessica-mitchell Feb 28, 2022
5bc5721
up to nest_types
jessica-mitchell Mar 2, 2022
942b454
Merge branch 'master' into cleanup-cpp-docs
jessica-mitchell Mar 22, 2022
1e7fec4
up to proxynode and move doxy comments in cpp
jessica-mitchell Mar 22, 2022
b5806de
to end
jessica-mitchell Mar 22, 2022
aa4ece2
change end line comment to //
jessica-mitchell Mar 22, 2022
70022a0
remove redundant lines
jessica-mitchell Mar 22, 2022
8324430
edit docs for comments
jessica-mitchell Mar 22, 2022
a41b74a
fix event delivery
jessica-mitchell Mar 22, 2022
031fe13
Merge branch 'master' into cleanup-cpp-docs
jessica-mitchell Oct 12, 2022
ba2077b
fix cpp format
jessica-mitchell Oct 12, 2022
e0a62a5
fix cpp
jessica-mitchell Oct 12, 2022
0fb61bd
remove single line constructor comments
jessica-mitchell Oct 13, 2022
81be685
add new line to multiline text, after first line, minor changes
jessica-mitchell Oct 14, 2022
841b02a
remove destructor comment
jessica-mitchell Oct 14, 2022
65f8bd4
fix up docs on cpp comments
jessica-mitchell Oct 14, 2022
a1d6e75
Update doc/htmldoc/developer_space/cppcomments.rst
jessica-mitchell Oct 14, 2022
eee82ce
remove diff markup
jessica-mitchell Oct 14, 2022
2720d8d
Merge branch 'cleanup-cpp-docs' of github.com:jessica-mitchell/nest-s…
jessica-mitchell Oct 14, 2022
68bf367
Apply suggestions from code review
jessica-mitchell Oct 17, 2022
d874253
Apply suggestions from code review
jessica-mitchell Feb 10, 2023
f82e2c9
apply suggestions from review
jessica-mitchell Feb 10, 2023
91db77e
revert endif comments
jessica-mitchell Feb 10, 2023
28104b3
revert cpp coment style back to slashses
jessica-mitchell Feb 10, 2023
0990b3b
Merge branch 'master' into cleanup-cpp-docs
jessica-mitchell Feb 10, 2023
4eac465
fix typo
jessica-mitchell Feb 10, 2023
b4d4c2d
Apply suggestions from code review
jessica-mitchell Feb 10, 2023
ef2ef8e
fix cpp error
jessica-mitchell Feb 10, 2023
9a60c0e
Merge branch 'cleanup-cpp-docs' of github.com:jessica-mitchell/nest-s…
jessica-mitchell Feb 10, 2023
3a7bba2
format clang nestkernel
jessica-mitchell Mar 2, 2023
825cf0b
Merge branch 'master' into cleanup-cpp-docs
jessica-mitchell May 9, 2023
fd6a774
clang format 13
jessica-mitchell May 9, 2023
2d6403c
Merge branch 'master' into cleanup-cpp-docs
jessica-mitchell May 25, 2023
f026dac
Merge branch 'master' into cleanup-cpp-docs
jessica-mitchell Jul 3, 2023
9e20df7
fix line spmanager
jessica-mitchell Jul 4, 2023
76e3bf4
rm bad line
jessica-mitchell Jul 4, 2023
e0005a1
Complete run-through of changes and fixes here and there.
jougs Jul 4, 2023
f285f17
Merge branch 'master' of github.com:nest/nest-simulator into cleanup-…
jougs Jul 4, 2023
9c86dab
Formatting
jougs Jul 4, 2023
ca7837d
Merge pull request #19 from jougs/cleanup-cpp-docs
jessica-mitchell Jul 4, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions nestkernel/archiving_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,12 @@ nest::ArchivingNode::ArchivingNode( const ArchivingNode& n )
void
ArchivingNode::register_stdp_connection( double t_first_read, double delay )
{
// Mark all entries in the deque, which we will not read in future as read by
// this input input, so that we savely increment the incoming number of
// connections afterwards without leaving spikes in the history.
// For details see bug #218. MH 08-04-22
/*
* Mark all entries in the deque, which we will not read in future as read by
* this input input, so that we savely increment the incoming number of
* connections afterwards without leaving spikes in the history.
* For details see bug #218. MH 08-04-22
*/

Comment thread
jessica-mitchell marked this conversation as resolved.
for ( std::deque< histentry >::iterator runner = history_.begin();
runner != history_.end() and ( t_first_read - runner->t_ > -1.0 * kernel().connection_manager.get_stdp_eps() );
Expand Down Expand Up @@ -186,12 +188,14 @@ nest::ArchivingNode::set_spiketime( Time const& t_sp, double offset )

if ( n_incoming_ )
{
// prune all spikes from history which are no longer needed
// only remove a spike if:
// - its access counter indicates it has been read out by all connected
// STDP synapses, and
// - there is another, later spike, that is strictly more than
// (max_delay_ + eps) away from the new spike (at t_sp_ms)
/*
* prune all spikes from history which are no longer needed
* only remove a spike if:
* - its access counter indicates it has been read out by all connected
* STDP synapses, and
* - there is another, later spike, that is strictly more than
* (max_delay_ + eps) away from the new spike (at t_sp_ms)
*/
Comment thread
jessica-mitchell marked this conversation as resolved.
Outdated
while ( history_.size() > 1 )
{
const double next_t_sp = history_[ 1 ].t_;
Expand Down
73 changes: 21 additions & 52 deletions nestkernel/archiving_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,52 +42,35 @@
namespace nest
{

/**
* A node which archives spike history for the purposes of spike-timing
* dependent plasticity (STDP)
*/
//! A node which archives spike history for the purposes of spike-timing
//! dependent plasticity (STDP)
class ArchivingNode : public StructuralPlasticityNode
{
public:
/**
* \fn ArchivingNode()
* Constructor.
*/

//! Constructor
ArchivingNode();

/**
* \fn ArchivingNode()
* Copy Constructor.
*/
//! Copy Constructor
ArchivingNode( const ArchivingNode& );

/**
* \fn double get_K_value(long t)
* return the Kminus (synaptic trace) value at t (in ms). When the trace is
* Return the Kminus (synaptic trace) value at t (in ms). When the trace is
Comment thread
jessica-mitchell marked this conversation as resolved.
Outdated
* requested at the exact same time that the neuron emits a spike, the trace
* value as it was just before the spike is returned.
*/
double get_K_value( double t );

/**
* \fn void get_K_values( double t,
* double& Kminus,
* double& nearest_neighbor_Kminus,
* double& Kminus_triplet )
* write the Kminus (eligibility trace for STDP),
* Write the Kminus (eligibility trace for STDP),
* nearest_neighbour_Kminus (eligibility trace for nearest-neighbour STDP:
* like Kminus, but increased to 1, rather than by 1, on a spike
* occurrence),
* and Kminus_triplet
* values at t (in ms) to the provided locations.
* like Kminus, but increased to 1, rather than by 1, on a spike
* occurrence), and Kminus_triplet values at t (in ms) to the provided locations.
* @throws UnexpectedEvent
*/
void get_K_values( double t, double& Kminus, double& nearest_neighbor_Kminus, double& Kminus_triplet );

/**
* \fn void get_K_values( double t,
* double& Kminus,
* double& Kminus_triplet )
* The legacy version of the function, kept for compatibility
* after changing the function signature in PR #865.
* @throws UnexpectedEvent
Expand All @@ -99,19 +82,11 @@ class ArchivingNode : public StructuralPlasticityNode
get_K_values( t, Kminus, nearest_neighbor_Kminus_to_discard, Kminus_triplet );
}

/**
* \fn double get_K_triplet_value(std::deque<histentry>::iterator &iter)
* return the triplet Kminus value for the associated iterator.
*/
//! Return the triplet Kminus value for the associated iterator.
double get_K_triplet_value( const std::deque< histentry >::iterator& iter );

/**
* \fn void get_history(long t1, long t2,
* std::deque<Archiver::histentry>::iterator* start,
* std::deque<Archiver::histentry>::iterator* finish)
* return the spike times (in steps) of spikes which occurred in the range
* (t1,t2].
*/
//! * Return the spike times (in steps) of spikes which occurred in the range
//! * [t1,t2].
void get_history( double t1,
double t2,
std::deque< histentry >::iterator* start,
Expand All @@ -129,27 +104,21 @@ class ArchivingNode : public StructuralPlasticityNode
void set_status( const DictionaryDatum& d );

protected:
/**
* \fn void set_spiketime(Time const & t_sp, double offset)
* record spike history
*/

//! Record spike history
void set_spiketime( Time const& t_sp, double offset = 0.0 );

/**
* \fn double get_spiketime()
* return most recent spike time in ms
*/
//! Return most recent spike time in ms
inline double get_spiketime_ms() const;

/**
* \fn void clear_history()
* clear spike history
*/
//! Clear spike history
void clear_history();

// number of incoming connections from stdp connectors.
// needed to determine, if every incoming connection has
// read the spikehistory for a given point in time
/*
* number of incoming connections from stdp connectors.
* needed to determine, if every incoming connection has
* read the spikehistory for a given point in time
*/
Comment thread
jessica-mitchell marked this conversation as resolved.
Outdated
Comment thread
jessica-mitchell marked this conversation as resolved.
Outdated
size_t n_incoming_;

private:
Expand Down
24 changes: 14 additions & 10 deletions nestkernel/clopath_archiving_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,15 @@ nest::ClopathArchivingNode::ClopathArchivingNode( const ClopathArchivingNode& n
void
nest::ClopathArchivingNode::init_clopath_buffers()
{
// Implementation of the delay of the convolved membrane potentials. This
// delay is not described in Clopath et al. 2010 but is present in the code
// (https://senselab.med.yale.edu/ModelDB/showmodel.cshtml?model=144566) on
// ModelDB which was presumably used to create the figures in the paper.
// Since we write into the buffer before we read from it, we have to
// add 1 to the size of the buffers.
delayed_u_bars_idx_ = 0;
/*
* Implementation of the delay of the convolved membrane potentials. This
* delay is not described in Clopath et al. 2010 but is present in the code
* (https://senselab.med.yale.edu/ModelDB/showmodel.cshtml?model=144566) on
* ModelDB which was presumably used to create the figures in the paper.
* Since we write into the buffer before we read from it, we have to
* add 1 to the size of the buffers.
*/
Comment thread
jessica-mitchell marked this conversation as resolved.
Outdated
layed_u_bars_idx_ = 0;
Comment thread
jessica-mitchell marked this conversation as resolved.
Outdated
delay_u_bars_steps_ = Time::delay_ms_to_steps( delay_u_bars_ ) + 1;
delayed_u_bar_plus_.resize( delay_u_bars_steps_ );
delayed_u_bar_minus_.resize( delay_u_bars_steps_ );
Expand Down Expand Up @@ -170,9 +172,11 @@ nest::ClopathArchivingNode::get_LTP_history( double t1,
else
{
std::deque< histentry_extended >::iterator runner = ltp_history_.begin();
// To have a well defined discretization of the integral, we make sure
// that we exclude the entry at t1 but include the one at t2 by subtracting
// a small number so that runner->t_ is never equal to t1 or t2.
/*
Comment thread
jessica-mitchell marked this conversation as resolved.
Outdated
* To have a well defined discretization of the integral, we make sure
* that we exclude the entry at t1 but include the one at t2 by subtracting
* a small number so that runner->t_ is never equal to t1 or t2.
*/
while ( ( runner != ltp_history_.end() ) && ( runner->t_ - 1.0e-6 < t1 ) )
{
++runner;
Expand Down
59 changes: 13 additions & 46 deletions nestkernel/clopath_archiving_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,77 +39,44 @@
namespace nest
{

/**
* \class ClopathArchivingNode
* a archiving node which additionally archives parameters
* and buffers needed for the Clopath plasticity rule
*/
//! An archiving node which additionally archives parameters
//! and buffers needed for the Clopath plasticity rule
class ClopathArchivingNode : public ArchivingNode
{

public:
/**
* \fn ClopathArchivingNode()
* Constructor.
*/
//! Constructor.
ClopathArchivingNode();

/**
* \fn ClopathArchivingNode()
* Copy Constructor.
*/
//! Copy Constructor.
ClopathArchivingNode( const ClopathArchivingNode& );

/**
* \fn double get_LTD_value(long t)
* Returns value in LTD history at time t
*/
//! Returns value in LTD history at time t
double get_LTD_value( double t );

/**
* \fn void get_LTP_history(long t1, long t2,
* std::deque<Archiver::histentry>::iterator* start,
* std::deque<Archiver::histentry>::iterator* finish)
* Sets pointer start (finish) to the first (last) entry in LTP_history
* whose time argument is between t1 and t2
*/
//! Sets pointer start (finish) to the first (last) entry in LTP_history
//! whose time argument is between t1 and t2
void get_LTP_history( double t1,
double t2,
std::deque< histentry_extended >::iterator* start,
std::deque< histentry_extended >::iterator* finish );

/**
* \fn double get_theta_plus()
* Returns threshold theta_plus_
*/
//! Returns threshold theta_plus_
double get_theta_plus() const;

/**
* \fn double get_theta_minus()
* Returns threshold theta_minus_
*/
//! Returns threshold theta_minus_
double get_theta_minus() const;

protected:
/**
* \fn void write_LTD_history( Time const& t_sp,
* double u_bar_minus, double u_bar_bar )
* Creates a new entry in the LTD history and deletes old entries that
* are not needed any more.
*/
//! Creates a new entry in the LTD history and deletes old entries that
//! are not needed any more.
void write_LTD_history( const double t_ltd_ms, double u_bar_minus, double u_bar_bar );

/**
* \fn void write_LTP_history( const double t_ltp_ms, double u,
* double u_bar_plus )
* Creates a new entry in the LTP history and delets old entries that
* are not needed any more.
*/
//! Creates a new entry in the LTP history and delets old entries that
//! are not needed any more.
void write_LTP_history( const double t_ltp_ms, double u, double u_bar_plus );

/**
* \fn void write_clopath_history( Time const& t_sp,
* double u, double u_bar_plus, double u_bar_minus, double u_bar_bar )
* Writes and reads the delayed_u_bar_[plus/minus] buffers and
* calls write_LTD_history and write_LTP_history if
* the corresponding Heaviside functions yield 1.
Expand Down
39 changes: 15 additions & 24 deletions nestkernel/common_properties_hom_w.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,43 +24,36 @@
#define COMMON_PROPERTIES_HOM_W_H

/** @BeginDocumentation

Name: static_synapse_hom_w - Static synapse type
using homogeneous weight, i.e. all synapses
feature the same w.

FirstVersion: April 2008

Author: Moritz Helias, Susanne Kunkel

SeeAlso: synapsedict, static_synapse
*/
*
* Name: static_synapse_hom_w - Static synapse type
* using homogeneous weight, i.e. all synapses
* feature the same w.
*
* FirstVersion: April 2008
*
* Author: Moritz Helias, Susanne Kunkel
*
* SeeAlso: synapsedict, static_synapse
*/

// Includes from nestkernel:
#include "common_synapse_properties.h"

namespace nest
{

/**
* Class containing the common properties for all synapses with common weight.
*/
//! Class containing the common properties for all synapses with common weight.
class CommonPropertiesHomW : public CommonSynapseProperties
{
public:
/**
* Default constructor.
* Sets all property values to defaults.
*/
//! Default constructor. Sets all property values to defaults.
CommonPropertiesHomW()
: CommonSynapseProperties()
, weight_( 1.0 )
{
}

/**
* Get all properties and put them into a dictionary.
*/
//! Get all properties and put them into a dictionary.
void
get_status( DictionaryDatum& d ) const
{
Expand All @@ -74,9 +67,7 @@ class CommonPropertiesHomW : public CommonSynapseProperties
return weight_;
}

/**
* Set properties from the values given in dictionary.
*/
//! Set properties from the values given in dictionary.
void
set_status( const DictionaryDatum& d, ConnectorModel& cm )
{
Expand Down
4 changes: 0 additions & 4 deletions nestkernel/common_synapse_properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@
namespace nest
{

/**
* Default implementation of an empty CommonSynapseProperties object.
*/

CommonSynapseProperties::CommonSynapseProperties()
: weight_recorder_()
, wr_node_id_( 0 )
Expand Down
Loading