Kaspersky Neuromorphic Platform  1.0.0
API Reference
Loading...
Searching...
No Matches
knp::framework::Model Class Reference

The Model class is a definition of a model that contains a network, input and output channels, a monitor and a backend. More...

#include <knp/framework/model.h>

+ Collaboration diagram for knp::framework::Model:

Public Member Functions

 Model (knp::framework::Network &&network)
 Model constructor.
 
const knp::core::UIDget_uid () const
 Get model UID.
 
auto & get_tags ()
 Get tags used by the model.
 
knp::framework::Networkget_network ()
 Get network associated with the model.
 
const knp::framework::Networkget_network () const
 Get network associated with the model.
 
void add_input_channel (const core::UID &channel_uid, const core::UID &projection_uid)
 Add an input channel to the network.
 
template<typename SynapseType >
void connect_input_projection (const core::UID &channel_uid, const core::Projection< SynapseType > &projection)
 Add an input channel to the network.
 
void add_output_channel (const core::UID &channel_uid, const core::UID &population_uid)
 Add an output channel to the network.
 
template<typename NeuronType >
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_input_channels () const
 Return all input channels.
 
const std::unordered_multimap< core::UID, core::UID, core::uid_hash > & get_output_channels () const
 Return all output channels.
 

Detailed Description

The Model class is a definition of a model that contains a network, input and output channels, a monitor and a backend.

Definition at line 49 of file model.h.

Constructor & Destructor Documentation

◆ Model()

knp::framework::Model::Model ( knp::framework::Network && network)
inlineexplicit

Model constructor.

Parameters
networknetwork to use in the model.

Definition at line 56 of file model.h.

Member Function Documentation

◆ add_input_channel()

void knp::framework::Model::add_input_channel ( const core::UID & channel_uid,
const core::UID & projection_uid )

Add an input channel to the network.

Parameters
channel_uidUID of the input channel.
projection_uidUID of the projection which will be connected to the channel.

◆ add_output_channel()

void knp::framework::Model::add_output_channel ( const core::UID & channel_uid,
const core::UID & population_uid )

Add an output channel to the network.

Parameters
channel_uidUID of the channel object.
population_uidUID of the population which will be connected to the channel.

◆ connect_input_projection()

template<typename SynapseType >
void knp::framework::Model::connect_input_projection ( const core::UID & channel_uid,
const core::Projection< SynapseType > & projection )
inline

Add an input channel to the network.

Parameters
channel_uidUID of the input channel.
projectionprojection which will be connected to the channel.

Definition at line 97 of file model.h.

+ Here is the call graph for this function:

◆ connect_output_population()

template<typename NeuronType >
void knp::framework::Model::connect_output_population ( const core::UID & channel_uid,
const core::Population< NeuronType > & population )
inline

Add an output channel to the network.

Parameters
channel_uidUID of the channel object.
populationpopulation which will be connected to the channel.

Definition at line 115 of file model.h.

+ Here is the call graph for this function:

◆ get_input_channels()

const std::unordered_multimap< core::UID, core::UID, core::uid_hash > & knp::framework::Model::get_input_channels ( ) const

Return all input channels.

Returns
map of input channels to projections.

◆ get_network() [1/2]

knp::framework::Network & knp::framework::Model::get_network ( )
inlinenodiscard

Get network associated with the model.

Returns
network.

Definition at line 76 of file model.h.

◆ get_network() [2/2]

const knp::framework::Network & knp::framework::Model::get_network ( ) const
inlinenodiscard

Get network associated with the model.

Note
Constant method.
Returns
network.

Definition at line 82 of file model.h.

◆ get_output_channels()

const std::unordered_multimap< core::UID, core::UID, core::uid_hash > & knp::framework::Model::get_output_channels ( ) const

Return all output channels.

Returns
map of output channels to populations.

◆ get_tags()

auto & knp::framework::Model::get_tags ( )
inlinenodiscard

Get tags used by the model.

Returns
model tag map.
See also
TagMap.

Definition at line 69 of file model.h.

◆ get_uid()

const knp::core::UID & knp::framework::Model::get_uid ( ) const
inlinenodiscard

Get model UID.

Returns
model UID.

Definition at line 63 of file model.h.


The documentation for this class was generated from the following file: