Cypress
1.0
C++ Spiking Neural Network Simulation Framework
|
#include <data.hpp>
Public Member Functions | |
PopulationDataView () | |
PopulationDataView (const PopulationDataView &other) | |
PopulationDataView (PopulationDataView &&) noexcept=default | |
PopulationDataView (std::shared_ptr< PopulationData > data, NeuronIndex nid0, NeuronIndex nid1, bool own_parameters=true, bool own_record=true, bool own_data=true) | |
PopulationDataView & | operator= (const PopulationDataView &other) |
Protected Member Functions | |
const PopulationData & | population_data () const |
PopulationData & | population_data () |
size_t | get_parameters_size () const |
size_t | get_record_size () const |
size_t | get_data_size () const |
const auto & | read_parameters () const |
const auto & | read_record () const |
const auto & | read_data () const |
auto | write_parameters (bool partial=true) |
auto | write_record (bool partial=true) |
auto | write_data (bool partial=true) |
Static Protected Member Functions | |
template<typename Seq > | |
static Seq::value_type | from_sequence (Seq list) |
View into part of the population data, indicated by a neuron start index and a neuron end index.
|
inline |
Default constructor – creates a separate instance of the underlying PopulationData.
cypress::PopulationDataView::PopulationDataView | ( | const PopulationDataView & | other | ) |
Creates a decoupled copy of the original population data view.
other | is the PopulationDataView of which a copy should be created. |
|
defaultnoexcept |
Move constructor.
|
inline |
Constructor which allows the PopulationDataView to act as a view onto the data stored for a range of neurons in a population. The ownership flags specify which data sections are updated on assignment.
data | is a reference onto the underlying population data store. |
nid0 | is the index of the first neuron represented by this view. |
nid1 | is the index of the last-plus-one neuron represented by this view. |
own_parameters | if true, the view covers the "parameters" section of the underlying data. |
own_record | if true, the view covers the "record" section of the underlying data. |
own_data | if true, the view covers the "data" section of the underlying data. |
|
inlinestaticprotected |
Templated method which allows to construct a PopulationDataView with its own data from a list of PopulationData objects. This method is used by the various neuron parameter and signal implementations to be able to supply a list of parameters/signals to the various constructors.
|
inlineprotected |
Returns the size of the record vector. Throws an exception if the neurons in the given range do not share parameters of the same size.
|
inlineprotected |
Returns the size of the parameter vector. Throws an exception if the neurons in the given range do not share parameters of the same size.
|
inlineprotected |
Returns the size of the record vector. Throws an exception if the neurons in the given range do not share parameters of the same size.
PopulationDataView& cypress::PopulationDataView::operator= | ( | const PopulationDataView & | other | ) |
Assignment operator. Sets the data in this instance to the data given in the other instance.
|
inlineprotected |
Returns a const reference at the underlying PopulationData.
|
inlineprotected |
Returns a reference at the underlying PopulationData.
|
inlineprotected |
Returns a const-reference at the vector containing the recorded data for the neurons represented by this view. Throws an exception if the neurons in this view do not share the same record flags.
|
inlineprotected |
Returns a const-reference at the parameter vector for the neurons represented by this view. Throws an exception if the neurons in this view do not share the same parameters.
|
inlineprotected |
Returns a const-reference at the vector specifying whether a signal should be recorded or not for the neurons represented by this view. Throws an exception if the neurons in this view do not share the same record flags.
|
inlineprotected |
Returns an iteratble range allowing to write the recorded data for the range of neurons represented by this vie2. Assumes that the data is being set to the same value for the specified range.
partial | if true, indicates that the record data is not entirely overridden, preventing the method from re-homogenising the data. |
|
inlineprotected |
Returns an iterable range allowing to modify the parameters for the range of neurons represented by this view. Assumes that the data is being set to the same value for the specified range.
partial | if true, indicates that the parameters are not entirely overridden, preventing the method from re-homogenising the data. |
|
inlineprotected |
Returns an iteratble range allowing to modify the record flags for the range of neurons represented by this view. Assumes that the data is being set to the same value for the specified range.
partial | if true, indicates that the record flags are not entirely overridden, preventing the method from re-homogenising the data. |