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 { Pairwise_bernoulli_on_source , Pairwise_bernoulli_on_target , Pairwise_poisson , Fixed_indegree , Fixed_outdegree } |
Public Member Functions | |
| ConnectionCreator (const Dictionary &dict) | |
| Construct a ConnectionCreator with the properties defined in the given dictionary. | |
| template<int D> | |
| void | connect (Layer< D > &source, NodeCollectionPTR source_nc, Layer< D > &target, NodeCollectionPTR target_nc) |
| Connect two layers. | |
Private Member Functions | |
| void | extract_params_ (const Dictionary &, std::vector< Dictionary > &) |
| template<typename Iterator , int D> | |
| void | connect_to_target_ (Iterator from, Iterator to, Node *tgt_ptr, const Position< D > &tgt_pos, size_t tgt_thread, const Layer< D > &source) |
| template<typename Iterator , int D> | |
| void | connect_to_target_poisson_ (Iterator from, Iterator to, Node *tgt_ptr, const Position< D > &tgt_pos, size_t tgt_thread, const Layer< D > &source) |
| template<int D> | |
| void | pairwise_bernoulli_on_source_ (Layer< D > &source, NodeCollectionPTR source_nc, Layer< D > &target, NodeCollectionPTR target_nc) |
| template<int D> | |
| void | pairwise_bernoulli_on_target_ (Layer< D > &source, NodeCollectionPTR source_nc, Layer< D > &target, NodeCollectionPTR target_nc) |
| template<int D> | |
| void | pairwise_poisson_ (Layer< D > &source, NodeCollectionPTR source_nc, Layer< D > &target, NodeCollectionPTR target_nc) |
| template<int D> | |
| void | fixed_indegree_ (Layer< D > &source, NodeCollectionPTR source_nc, Layer< D > &target, NodeCollectionPTR target_nc) |
| template<int D> | |
| void | fixed_outdegree_ (Layer< D > &source, NodeCollectionPTR source_nc, Layer< D > &target, NodeCollectionPTR target_nc) |
Private Attributes | |
| ConnectionType | type_ |
| bool | allow_autapses_ |
| bool | allow_multapses_ |
| bool | allow_oversized_ |
| ParameterPTR | number_of_connections_ |
| MaskPTR | mask_ |
| ParameterPTR | kernel_ |
| std::vector< size_t > | synapse_model_ |
| std::vector< std::vector< Dictionary > > | param_dicts_ |
| std::vector< ParameterPTR > | weight_ |
| std::vector< ParameterPTR > | delay_ |
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., fixed_indegree_) 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.
The difference between the Pairwise_bernoulli_on_source and Pairwise_bernoulli_on_target connection types is which layer coordinates the mask and parameters are defined in.
| nest::ConnectionCreator::ConnectionCreator | ( | const Dictionary & | 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 Dictionary::all_entries_accessed(), nest::names::allow_autapses(), allow_autapses_, nest::names::allow_multapses(), allow_multapses_, allow_oversized_, nest::names::allow_oversized_mask(), Dictionary::at(), nest::names::connection_type(), nest::create_mask(), nest::create_parameter(), nest::names::delay(), delay_, extract_params_(), Fixed_indegree, Fixed_outdegree, Dictionary::get(), nest::ModelManager::get_connector_defaults(), nest::ModelManager::get_synapse_model_id(), nest::names::has_delay(), nest::names::kernel(), nest::kernel(), kernel_, Dictionary::known(), nest::names::mask(), mask_, nest::KernelManager::model_manager, numerics::nan, nest::names::number_of_connections(), number_of_connections_, Pairwise_bernoulli_on_source, nest::names::pairwise_bernoulli_on_source(), Pairwise_bernoulli_on_target, nest::names::pairwise_bernoulli_on_target(), Pairwise_poisson, nest::names::pairwise_poisson(), param_dicts_, synapse_model_, nest::names::synapse_parameters(), type_, Dictionary::update_value(), nest::names::weight(), and weight_.
| void nest::ConnectionCreator::connect | ( | Layer< D > & | source, |
| NodeCollectionPTR | source_nc, | ||
| Layer< D > & | target, | ||
| NodeCollectionPTR | target_nc | ||
| ) |
Connect two layers.
| source | source layer. |
| source | NodeCollection of the source. |
| target | target layer. |
| target | NodeCollection of the target. |
References Fixed_indegree, fixed_indegree_(), Fixed_outdegree, fixed_outdegree_(), Pairwise_bernoulli_on_source, pairwise_bernoulli_on_source_(), Pairwise_bernoulli_on_target, pairwise_bernoulli_on_target_(), Pairwise_poisson, pairwise_poisson_(), and type_.
Referenced by nest::Layer< D >::connect().
|
private |
References allow_autapses_, nest::ConnectionManager::connect(), nest::KernelManager::connection_manager, delay_, nest::BaseRandomGenerator::drand(), nest::Node::get_node_id(), nest::Position< D, T >::get_vector(), nest::get_vp_specific_rng(), nest::kernel(), kernel_, param_dicts_, synapse_model_, and weight_.
Referenced by pairwise_bernoulli_on_source_(), and pairwise_bernoulli_on_target_().
|
private |
References allow_autapses_, nest::ConnectionManager::connect(), nest::KernelManager::connection_manager, delay_, nest::Node::get_node_id(), nest::Position< D, T >::get_vector(), nest::get_vp_specific_rng(), nest::kernel(), kernel_, param_dicts_, synapse_model_, and weight_.
Referenced by pairwise_poisson_().
|
private |
References Dictionary::at(), nest::create_parameter(), nest::names::delay(), delay_, Dictionary::get(), nest::ModelManager::get_connector_defaults(), nest::ModelManager::get_synapse_model_id(), nest::names::has_delay(), nest::kernel(), Dictionary::known(), nest::KernelManager::model_manager, numerics::nan, nest::names::receptor_type(), nest::names::synapse_label(), nest::names::synapse_model(), synapse_model_, nest::names::weight(), and weight_.
Referenced by ConnectionCreator().
|
private |
References allow_autapses_, allow_multapses_, allow_oversized_, nest::MaskedLayer< D >::begin(), nest::ConnectionManager::connect(), nest::KernelManager::connection_manager, delay_, nest::MaskedLayer< D >::end(), nest::NodeManager::get_node_or_proxy(), nest::Node::get_thread(), nest::Position< D, T >::get_vector(), nest::get_vp_specific_rng(), nest::Node::has_proxies(), nest::Node::is_proxy(), nest::kernel(), kernel_, mask_, nest::KernelManager::node_manager, number_of_connections_, nest::RandomDistribution< DistributionT >::param(), param_dicts_, synapse_model_, nest::BaseRandomGenerator::ulrand(), and weight_.
Referenced by connect().
|
private |
References allow_autapses_, allow_multapses_, allow_oversized_, nest::MaskedLayer< D >::begin(), nest::ConnectionManager::connect(), nest::KernelManager::connection_manager, delay_, nest::MaskedLayer< D >::end(), nest::NodeManager::get_node_or_proxy(), nest::get_rank_synced_rng(), nest::Node::get_thread(), nest::Position< D, T >::get_vector(), nest::Node::has_proxies(), nest::Node::is_proxy(), nest::kernel(), kernel_, mask_, nest::KernelManager::node_manager, number_of_connections_, nest::RandomDistribution< DistributionT >::param(), param_dicts_, synapse_model_, and weight_.
Referenced by connect().
|
private |
References allow_oversized_, nest::ConnectionCreator::PoolWrapper_< D >::begin(), connect_to_target_(), nest::ConnectionCreator::PoolWrapper_< D >::define(), nest::ConnectionCreator::PoolWrapper_< D >::end(), nest::NodeManager::get_node_or_proxy(), nest::VPManager::get_thread_id(), nest::Node::is_proxy(), nest::kernel(), mask_, nest::ConnectionCreator::PoolWrapper_< D >::masked_begin(), nest::ConnectionCreator::PoolWrapper_< D >::masked_end(), nest::KernelManager::node_manager, and nest::KernelManager::vp_manager.
Referenced by connect().
|
private |
References allow_oversized_, nest::ConnectionCreator::PoolWrapper_< D >::begin(), connect_to_target_(), nest::ConnectionCreator::PoolWrapper_< D >::define(), nest::ConnectionCreator::PoolWrapper_< D >::end(), nest::NodeManager::get_node_or_proxy(), nest::VPManager::get_thread_id(), nest::Node::has_proxies(), nest::Node::is_proxy(), nest::kernel(), mask_, nest::ConnectionCreator::PoolWrapper_< D >::masked_begin(), nest::ConnectionCreator::PoolWrapper_< D >::masked_end(), nest::KernelManager::node_manager, and nest::KernelManager::vp_manager.
Referenced by connect().
|
private |
References allow_oversized_, nest::ConnectionCreator::PoolWrapper_< D >::begin(), connect_to_target_poisson_(), nest::ConnectionCreator::PoolWrapper_< D >::define(), nest::ConnectionCreator::PoolWrapper_< D >::end(), nest::NodeManager::get_node_or_proxy(), nest::VPManager::get_thread_id(), nest::Node::is_proxy(), nest::kernel(), mask_, nest::ConnectionCreator::PoolWrapper_< D >::masked_begin(), nest::ConnectionCreator::PoolWrapper_< D >::masked_end(), nest::KernelManager::node_manager, and nest::KernelManager::vp_manager.
Referenced by connect().
|
private |
Referenced by connect_to_target_(), connect_to_target_poisson_(), ConnectionCreator(), fixed_indegree_(), and fixed_outdegree_().
|
private |
Referenced by ConnectionCreator(), fixed_indegree_(), and fixed_outdegree_().
|
private |
|
private |
|
private |
Referenced by connect_to_target_(), connect_to_target_poisson_(), ConnectionCreator(), fixed_indegree_(), and fixed_outdegree_().
|
private |
|
private |
Referenced by ConnectionCreator(), fixed_indegree_(), and fixed_outdegree_().
|
private |
Referenced by connect_to_target_(), connect_to_target_poisson_(), ConnectionCreator(), fixed_indegree_(), and fixed_outdegree_().
|
private |
|
private |
Referenced by connect(), and ConnectionCreator().
|
private |