Abstract base class for Layers of unspecified dimension. More...
#include <layer.h>
Public Member Functions | |
| AbstractLayer () | |
| virtual | ~AbstractLayer () |
| virtual void | set_status (const Dictionary &)=0 |
| Change properties of the layer according to the entries in the dictionary. | |
| virtual void | get_status (Dictionary &, NodeCollection const *const) const =0 |
| Export properties of the layer by setting entries in the status dictionary, respects slicing of given NodeCollection. | |
| virtual unsigned int | get_num_dimensions () const =0 |
| virtual std::vector< double > | get_position_vector (const size_t lid) const =0 |
| Get position of node. | |
| virtual std::vector< double > | compute_displacement (const std::vector< double > &from_pos, const size_t to) const =0 |
| Returns displacement of node from given position. | |
| virtual double | compute_displacement (const std::vector< double > &from_pos, const std::vector< double > &to_pos, const unsigned int dimension) const =0 |
| virtual double | compute_distance (const std::vector< double > &from_pos, const size_t lid) const =0 |
| Returns distance to node from given position. | |
| virtual double | compute_distance (const std::vector< double > &from_pos, const std::vector< double > &to_pos) const =0 |
| virtual void | connect (NodeCollectionPTR source_nc, AbstractLayerPTR target, NodeCollectionPTR target_nc, ConnectionCreator &connector)=0 |
| Connect this layer to the given target layer. | |
| virtual std::vector< size_t > | get_global_nodes (const MaskPTR mask, const std::vector< double > &anchor, bool allow_oversized, NodeCollectionPTR node_collection)=0 |
| Return a vector with the node IDs of the nodes inside the mask. | |
| virtual void | dump_nodes (std::ostream &os) const =0 |
| Write layer data to stream. | |
| virtual void | dump_connections (std::ostream &out, NodeCollectionPTR node_collection, AbstractLayerPTR target_layer, const std::string &syn_model)=0 |
| Dumps information about all connections of the given type having their source in the given layer to the given output stream. | |
| void | set_node_collection (NodeCollectionPTR) |
| NodeCollectionPTR | get_node_collection () |
Static Public Member Functions | |
| static NodeCollectionPTR | create_layer (const Dictionary &) |
| Factory function for layers. | |
Protected Member Functions | |
| virtual void | clear_ntree_cache_ () const =0 |
| Clear the cache for global position information. | |
| virtual void | clear_vector_cache_ () const =0 |
| Clear the cache for global position information. | |
| NodeCollectionMetadataPTR | get_metadata () const |
| Gets metadata of the NodeCollection to which this layer belongs. | |
Protected Attributes | |
| NodeCollectionPTR | node_collection_ |
| The NodeCollection to which the layer belongs. | |
Static Protected Attributes | |
| static NodeCollectionMetadataPTR | cached_ntree_md_ = NodeCollectionMetadataPTR( nullptr ) |
| Metadata for the layer for which we cache global position information. | |
| static NodeCollectionMetadataPTR | cached_vector_md_ = NodeCollectionMetadataPTR( nullptr ) |
| Metadata for the layer for which we cache global position information. | |
Abstract base class for Layers of unspecified dimension.
|
inline |
|
virtual |
|
protectedpure virtual |
Clear the cache for global position information.
Implemented in nest::Layer< D >.
|
protectedpure virtual |
Clear the cache for global position information.
Implemented in nest::Layer< D >.
|
pure virtual |
Returns displacement of node from given position.
When using periodic boundary conditions, will return minimum displacement.
| from_pos | position vector in layer |
| to | node in layer to which displacement is to be computed |
Implemented in nest::Layer< D >.
Referenced by nest::SpatialDistanceParameter::value().
|
pure virtual |
Implemented in nest::Layer< D >.
|
pure virtual |
Returns distance to node from given position.
When using periodic boundary conditions, will return minimum distance.
| from_pos | position vector in layer |
| to | node in layer to which displacement is to be computed |
Implemented in nest::Layer< D >.
Referenced by nest::SpatialDistanceParameter::value().
|
pure virtual |
Implemented in nest::Layer< D >.
|
pure virtual |
Connect this layer to the given target layer.
The actual connections are made in class ConnectionCreator.
| source_nc | NodeCollection of the source layer |
| target | target layer to connect to. Must have same dimension as this layer. |
| target_nc | NodeCollection of the target layer |
| connector | connection properties |
Implemented in nest::Layer< D >.
|
static |
Factory function for layers.
The supplied dictionary contains parameters which specify the layer type and type-specific parameters.
References nest::NodeManager::add_node(), Dictionary::at(), nest::names::elements(), Dictionary::get(), nest::get_layer(), nest::ModelManager::get_node_model_id(), nest::kernel(), Dictionary::known(), nest::KernelManager::model_manager, nest::names::n(), nest::KernelManager::node_manager, nest::names::positions(), set_status(), and nest::names::shape().
Referenced by nest::create_layer().
|
pure virtual |
Dumps information about all connections of the given type having their source in the given layer to the given output stream.
For distributed simulations this function will dump the connections with local targets only.
| out | output stream |
| node_collection | NodeCollection of the layer |
| target_layer | Target layer |
| synapse_id | type of connection |
Implemented in nest::Layer< D >.
|
pure virtual |
Write layer data to stream.
For each node in layer, write one line to stream containing: node ID x-position y-position [z-position]
| os | output stream |
Implemented in nest::Layer< D >.
|
pure virtual |
Return a vector with the node IDs of the nodes inside the mask.
| mask | mask to apply. |
| anchor | position to center mask in. |
| allow_oversized | allow mask to be greater than layer |
| node_collection | NodeCollection of the layer |
Implemented in nest::Layer< D >.
|
protected |
Gets metadata of the NodeCollection to which this layer belongs.
References node_collection_.
|
inline |
References node_collection_.
|
pure virtual |
Implemented in nest::Layer< D >.
Referenced by nest::SpatialDistanceParameter::value().
|
pure virtual |
Get position of node.
Only possible for local nodes.
| lid | global index of node within layer |
Implemented in nest::Layer< D >.
|
pure virtual |
Export properties of the layer by setting entries in the status dictionary, respects slicing of given NodeCollection.
| d | Dictionary. |
Implemented in nest::FreeLayer< D >, nest::Layer< D >, and nest::GridLayer< D >.
|
inline |
References node_collection_.
|
pure virtual |
Change properties of the layer according to the entries in the dictionary.
| d | Dictionary with named parameter settings. |
Implemented in nest::FreeLayer< D >, nest::Layer< D >, and nest::GridLayer< D >.
Referenced by create_layer().
|
staticprotected |
Metadata for the layer for which we cache global position information.
|
staticprotected |
Metadata for the layer for which we cache global position information.
|
protected |
The NodeCollection to which the layer belongs.
Referenced by nest::Layer< D >::dump_connections(), get_metadata(), get_node_collection(), and set_node_collection().