NEST
2.6.0,not_revisioned_source_dir@0
|
This class is a representation of the dictionary of connection properties given as an argument to the ConnectLayers function. More...
#include <connection_creator.h>
Classes | |
class | PoolWrapper_ |
Wrapper for masked and unmasked pools. More... | |
Public Types | |
enum | ConnectionType { Target_driven, Source_driven, Convergent, Divergent } |
Public Member Functions | |
ConnectionCreator (DictionaryDatum dict) | |
Construct a ConnectionCreator with the properties defined in the given dictionary. More... | |
template<int D> | |
void | connect (Layer< D > &source, Layer< D > &target) |
Connect two layers. More... | |
Private Member Functions | |
template<typename Iterator , int D> | |
void | connect_to_target_ (Iterator from, Iterator to, Node *tgt_ptr, const Position< D > &tgt_pos, thread tgt_thread, const Layer< D > &source) |
template<int D> | |
void | target_driven_connect_ (Layer< D > &source, Layer< D > &target) |
template<int D> | |
void | source_driven_connect_ (Layer< D > &source, Layer< D > &target) |
template<int D> | |
void | convergent_connect_ (Layer< D > &source, Layer< D > &target) |
template<int D> | |
void | divergent_connect_ (Layer< D > &source, Layer< D > &target) |
void | connect_ (index s, Node *target, thread target_thread, double_t w, double_t d, index syn) |
template<int D> | |
void | get_parameters_ (const Position< D > &pos, librandom::RngPtr rng, double &weight, double &delay) |
Calculate parameter values for this position. More... | |
Private Attributes | |
ConnectionType | type_ |
bool | allow_autapses_ |
bool | allow_multapses_ |
bool | allow_oversized_ |
Selector | source_filter_ |
Selector | target_filter_ |
index | number_of_connections_ |
lockPTR< AbstractMask > | mask_ |
lockPTR< Parameter > | kernel_ |
index | synapse_model_ |
lockPTR< Parameter > | weight_ |
lockPTR< Parameter > | delay_ |
Network & | net_ |
This class is a representation of the dictionary of connection properties given as an argument to the ConnectLayers function.
The connect method is responsible for generating the connection according to the given parameters. This method is templated with the dimension of the layers, and is called via the Layer connect call using a visitor pattern. The connect method relays to another method (e.g., convergent_connect_) implementing the concrete connection algorithm. It would be more elegant if this was a base class for classes representing different connection algorithms with a virtual connect method, but it is not possible to have a virtual template method.
This class distinguishes between target driven and convergent connections, which are both called "convergent" in the Topology module documentation, and between source driven and divergent connections. The true convergent/divergent connections are those with a fixed number of connections (fan in/out). The only difference between source driven and target driven connections is which layer coordinates the mask and parameters are defined in.
nest::ConnectionCreator::ConnectionCreator | ( | DictionaryDatum | dict | ) |
Construct a ConnectionCreator with the properties defined in the given dictionary.
Parameters for a ConnectionCreator are:
dict | dictionary containing properties for the connections. |
References nest::names::allow_autapses, allow_autapses_, nest::names::allow_multapses, allow_multapses_, allow_oversized_, nest::names::allow_oversized_mask, nest::names::connection_type, nest::names::convergent, Convergent, nest::TopologyModule::create_mask(), nest::TopologyModule::create_parameter(), nest::names::delay, delay_, nest::names::delays, nest::names::divergent, Divergent, nest::Network::get_connector_defaults(), nest::Network::get_synapsedict(), getValue< bool >(), nest::names::kernel, kernel_, Dictionary::lookup(), nest::names::mask, mask_, net_, nest::names::number_of_connections, number_of_connections_, Source_driven, source_filter_, nest::names::sources, nest::names::synapse_model, synapse_model_, Target_driven, target_filter_, nest::names::targets, type_, nest::names::weight, weight_, and nest::names::weights.
Connect two layers.
source | source layer. |
target | target layer. |
References Convergent, convergent_connect_(), Divergent, divergent_connect_(), Source_driven, source_driven_connect_(), Target_driven, target_driven_connect_(), and type_.
Referenced by nest::Layer< D >::connect().
|
inlineprivate |
References nest::Network::connect(), nest::Node::get_gid(), nest::Network::get_thread_id(), nest::Network::is_local_gid(), and net_.
Referenced by connect_to_target_().
|
private |
References allow_autapses_, nest::Layer< D >::compute_displacement(), connect_(), delay_, nest::Node::get_gid(), nest::Network::get_rng(), kernel_, net_, synapse_model_, and weight_.
Referenced by target_driven_connect_().
|
private |
References allow_autapses_, allow_multapses_, allow_oversized_, nest::Layer< D >::compute_displacement(), nest::Network::connect(), nest::names::d, nest::Selector::depth, nest::Layer< D >::get_global_positions_vector(), get_parameters_(), nest::Layer< D >::get_position(), nest::Vose::get_random_id(), nest::Network::get_rng(), kernel_, nest::AbstractLayer::local_begin(), nest::AbstractLayer::local_end(), mask_, nest::Selector::model, net_, number_of_connections_, nest::names::positions, nest::Selector::select_depth(), nest::Selector::select_model(), source_filter_, synapse_model_, target_filter_, nest::names::target_thread, lockPTR< D >::valid(), and nest::names::w.
Referenced by connect().
|
private |
References allow_autapses_, allow_multapses_, allow_oversized_, nest::MaskedLayer< D >::begin(), nest::Layer< D >::compute_displacement(), nest::Network::connect(), nest::names::d, nest::MaskedLayer< D >::end(), nest::Layer< D >::get_global_positions_vector(), nest::Network::get_grng(), nest::Network::get_node(), get_parameters_(), nest::Vose::get_random_id(), nest::Node::get_thread(), kernel_, mask_, net_, number_of_connections_, source_filter_, nest::names::sources, synapse_model_, target_filter_, nest::names::targets, and nest::names::w.
Referenced by connect().
|
private |
Calculate parameter values for this position.
TODO: remove when all four connection variants are refactored
References delay_, and weight_.
Referenced by convergent_connect_(), divergent_connect_(), and source_driven_connect_().
|
private |
References allow_autapses_, allow_oversized_, nest::MaskedLayer< D >::begin(), nest::Layer< D >::compute_displacement(), nest::Network::connect(), nest::names::d, nest::Selector::depth, nest::MaskedLayer< D >::end(), nest::Layer< D >::get_global_positions_vector(), get_parameters_(), nest::Layer< D >::get_position(), nest::Network::get_rng(), kernel_, nest::AbstractLayer::local_begin(), nest::AbstractLayer::local_end(), mask_, nest::Selector::model, net_, nest::names::positions, nest::Selector::select_depth(), nest::Selector::select_model(), source_filter_, synapse_model_, target_filter_, nest::names::target_thread, lockPTR< D >::valid(), and nest::names::w.
Referenced by connect().
|
private |
References allow_oversized_, nest::ConnectionCreator::PoolWrapper_< D >::begin(), connect_to_target_(), nest::ConnectionCreator::PoolWrapper_< D >::define(), nest::Selector::depth, nest::ConnectionCreator::PoolWrapper_< D >::end(), nest::Layer< D >::get_global_positions_vector(), nest::Layer< D >::get_position(), nest::Network::get_thread_id(), nest::AbstractLayer::local_begin(), nest::AbstractLayer::local_end(), mask_, nest::ConnectionCreator::PoolWrapper_< D >::masked_begin(), nest::ConnectionCreator::PoolWrapper_< D >::masked_end(), nest::Selector::model, net_, nest::Selector::select_depth(), nest::Selector::select_model(), nest::names::source, source_filter_, target_filter_, nest::names::target_thread, and lockPTR< D >::valid().
Referenced by connect().
|
private |
Referenced by connect_to_target_(), ConnectionCreator(), convergent_connect_(), divergent_connect_(), and source_driven_connect_().
|
private |
Referenced by ConnectionCreator(), convergent_connect_(), and divergent_connect_().
|
private |
Referenced by ConnectionCreator(), convergent_connect_(), divergent_connect_(), source_driven_connect_(), and target_driven_connect_().
Referenced by connect_to_target_(), ConnectionCreator(), and get_parameters_().
Referenced by connect_to_target_(), ConnectionCreator(), convergent_connect_(), divergent_connect_(), and source_driven_connect_().
|
private |
Referenced by ConnectionCreator(), convergent_connect_(), divergent_connect_(), source_driven_connect_(), and target_driven_connect_().
|
private |
|
private |
Referenced by ConnectionCreator(), convergent_connect_(), and divergent_connect_().
|
private |
Referenced by ConnectionCreator(), convergent_connect_(), divergent_connect_(), source_driven_connect_(), and target_driven_connect_().
|
private |
Referenced by connect_to_target_(), ConnectionCreator(), convergent_connect_(), divergent_connect_(), and source_driven_connect_().
|
private |
Referenced by ConnectionCreator(), convergent_connect_(), divergent_connect_(), source_driven_connect_(), and target_driven_connect_().
|
private |
Referenced by connect(), and ConnectionCreator().
Referenced by connect_to_target_(), ConnectionCreator(), and get_parameters_().