25#include <knp/core/impexp.h>
34#include <unordered_map>
56 explicit Model(knp::framework::Network &&network) : network_(std::move(network)) {}
63 [[nodiscard]]
const knp::core::UID &
get_uid()
const {
return base_.uid_; }
69 [[nodiscard]]
auto &
get_tags() {
return base_.tags_; }
76 [[nodiscard]] knp::framework::Network &
get_network() {
return network_; }
82 [[nodiscard]]
const knp::framework::Network &
get_network()
const {
return network_; }
96 template <
typename SynapseType>
99 add_input_channel(channel_uid, projection.
get_uid());
114 template <
typename NeuronType>
117 add_output_channel(channel_uid, population.
get_uid());
132 knp::core::BaseData base_;
133 knp::framework::Network network_;
135 std::unordered_multimap<core::UID, core::UID, core::uid_hash> in_channels_;
137 std::unordered_multimap<core::UID, core::UID, core::uid_hash> out_channels_;
Backend loader interface.
const UID & get_uid() const
Get population UID.
const UID & get_uid() const
Get projection UID.
The Model class is a definition of a model that contains a network, input and output channels,...
const std::unordered_multimap< core::UID, core::UID, core::uid_hash > & get_input_channels() const
Return all input channels.
auto & get_tags()
Get tags used by the model.
const knp::framework::Network & get_network() const
Get network associated with the model.
void connect_output_population(const core::UID &channel_uid, const core::Population< NeuronType > &population)
Add an output channel to the network.
const std::unordered_multimap< core::UID, core::UID, core::uid_hash > & get_output_channels() const
Return all output channels.
void add_output_channel(const core::UID &channel_uid, const core::UID &population_uid)
Add an output channel to the network.
void connect_input_projection(const core::UID &channel_uid, const core::Projection< SynapseType > &projection)
Add an input channel to the network.
void add_input_channel(const core::UID &channel_uid, const core::UID &projection_uid)
Add an input channel to the network.
knp::framework::Network & get_network()
Get network associated with the model.
Model(knp::framework::Network &&network)
Model constructor.
const knp::core::UID & get_uid() const
Get model UID.
Class definition for core library basic entities.
Observer class that unloads messages and stores them.
Header for output channel.