Cypress  1.0
C++ Spiking Neural Network Simulation Framework
Public Types | Public Member Functions | List of all members
cypress::PopulationView< T > Class Template Reference

#include <network.hpp>

Inheritance diagram for cypress::PopulationView< T >:
Inheritance graph
[legend]
Collaboration diagram for cypress::PopulationView< T >:
Collaboration graph
[legend]

Public Types

using iterator = iterator_< 1, false >
 
using const_iterator = iterator_< 1, true >
 
using reverse_iterator = iterator_<-1, false >
 
using const_reverse_iterator = iterator_<-1, true >
 

Public Member Functions

 PopulationView (const NetworkBase &network, PopulationIndex pid, NeuronIndex nid0, NeuronIndex nid1)
 
 operator PopulationViewBase () const
 
 operator const PopulationViewBase & () const
 
 operator PopulationViewBase & ()
 
const NeuronTypetype () const
 
Network network () const
 
PopulationIndex pid () const
 
NeuronIndex nid_begin () const
 
NeuronIndex nid_end () const
 
Neuron< T > operator[] (NeuronIndex i)
 
const Neuron< T > operator[] (NeuronIndex i) const
 
Neuron< T > operator() (NeuronIndex i)
 
const Neuron< T > operator() (NeuronIndex i) const
 
size_t size ()
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
const PopulationView< T > range (NeuronIndex begin, NeuronIndex end) const
 
PopulationView< T > range (NeuronIndex begin, NeuronIndex end)
 
const PopulationView< T > operator() (NeuronIndex begin, NeuronIndex end) const
 
PopulationView< T > operator() (NeuronIndex begin, NeuronIndex end)
 
bool operator== (const Other &o) const
 
bool operator!= (const Other &o) const
 
bool operator< (const Other &o) const
 
bool operator<= (const Other &o) const
 
bool operator> (const Other &o) const
 
bool operator>= (const Other &o) const
 
const T::Parameters parameters () const
 
T::Parameters parameters ()
 
const T::Signals signals () const
 
T::Signals signals ()
 
PopulationView< T > & connect_to (TargetIterator tar_begin, TargetIterator tar_end, std::unique_ptr< Connector > connector, const char *name="")
 
PopulationView< T > & connect_to (const Target &tar, std::unique_ptr< Connector > connector, const char *name="")
 

Detailed Description

template<typename T>
class cypress::PopulationView< T >

The PopulationView class represents a subset of neurons in a Population.

Template Parameters
Tis the neuron type.

Member Typedef Documentation

using cypress::IterableMixin< PopulationView< T > , Neuron< T > , Accessor >::const_iterator = iterator_<1, true>
inherited
using cypress::IterableMixin< PopulationView< T > , Neuron< T > , Accessor >::const_reverse_iterator = iterator_<-1, true>
inherited
using cypress::IterableMixin< PopulationView< T > , Neuron< T > , Accessor >::iterator = iterator_<1, false>
inherited
using cypress::IterableMixin< PopulationView< T > , Neuron< T > , Accessor >::reverse_iterator = iterator_<-1, false>
inherited

Constructor & Destructor Documentation

template<typename T >
cypress::PopulationView< T >::PopulationView ( const NetworkBase network,
PopulationIndex  pid,
NeuronIndex  nid0,
NeuronIndex  nid1 
)
inline

Creates a population view as a handle pointing at an already existing population with the given population index and the specified range of neuron indices.

Parameters
networkis the network in which the population is located.
pidis the population index of the already existing population in the referenced network.
nid0is the index of the first neuron in the population that can be accessed in this view.
nid1is the index of the last-plus-one neuron in the population that can be accessed in this view.

Member Function Documentation

iterator cypress::IterableMixin< PopulationView< T > , Neuron< T > , Accessor >::begin ( )
inlineinherited

Returns an iterator at the first neuron in the population. For neurons, returns an iterator pointing at the neuron itself.

const_iterator cypress::IterableMixin< PopulationView< T > , Neuron< T > , Accessor >::begin ( ) const
inlineinherited
const_iterator cypress::IterableMixin< PopulationView< T > , Neuron< T > , Accessor >::cbegin ( ) const
inlineinherited
const_iterator cypress::IterableMixin< PopulationView< T > , Neuron< T > , Accessor >::cend ( ) const
inlineinherited
PopulationView< T > & cypress::ConnectableMixin< PopulationView< T > , Accessor >::connect_to ( TargetIterator  tar_begin,
TargetIterator  tar_end,
std::unique_ptr< Connector connector,
const char *  name = "" 
)
inlineinherited

Connects all neurons in this Population, PopulationView or Neuron with a range of neurons indicated by the given iterators.

Parameters
tar_beginis an iterator pointing at the first neuron in the target population that should be connected.
tar_endis an iterator pointing at the last neuron in the target population that should be connected.
connectoris the object establishing the actual connections.
Returns
a reference at this object for function chaining.
PopulationView< T > & cypress::ConnectableMixin< PopulationView< T > , Accessor >::connect_to ( const Target &  tar,
std::unique_ptr< Connector connector,
const char *  name = "" 
)
inlineinherited

Connects all neurons in this Population, PopulationView or Neuron with the given target, which may be a Population, PopulationView or a single neuron.

Parameters
taris the object this object should be connected with.
connectoris the object establishing the actual connections.
Returns
a reference at this object for function chaining.
const_reverse_iterator cypress::IterableMixin< PopulationView< T > , Neuron< T > , Accessor >::crbegin ( ) const
inlineinherited
const_reverse_iterator cypress::IterableMixin< PopulationView< T > , Neuron< T > , Accessor >::crend ( ) const
inlineinherited
iterator cypress::IterableMixin< PopulationView< T > , Neuron< T > , Accessor >::end ( )
inlineinherited

Returns an iterator at the last-plus-one neuron in the population.

const_iterator cypress::IterableMixin< PopulationView< T > , Neuron< T > , Accessor >::end ( ) const
inlineinherited
template<typename T >
Network cypress::PopulationView< T >::network ( ) const
inline

Returns a handle pointing at the network this population is located in.

Returns
a Network object representing the network this population is located in.
template<typename T >
NeuronIndex cypress::PopulationView< T >::nid_begin ( ) const
inline

Returns the index of the first neuron belonging to this PopulationView.

template<typename T >
NeuronIndex cypress::PopulationView< T >::nid_end ( ) const
inline

Returns the index of the last-plus-one neuron belonging to this PopulationView.

template<typename T >
cypress::PopulationView< T >::operator const PopulationViewBase & ( ) const
inline
template<typename T >
cypress::PopulationView< T >::operator PopulationViewBase ( ) const
inline

This class can be implicitly converted to PopulationBase, loosing the neuron type information.

template<typename T >
cypress::PopulationView< T >::operator PopulationViewBase & ( )
inline
bool cypress::DataMixin< PopulationView< T > , Accessor, T::Parameters , T::Signals >::operator!= ( const Other &  o) const
inlineinherited
const PopulationView< T > cypress::ViewableMixin< PopulationView< T > , PopulationView< T > , Accessor >::operator() ( NeuronIndex  begin,
NeuronIndex  end 
) const
inlineinherited

Returns a constant View object representing a range of neurons relative to this object.

Parameters
beginis the index of the first neuron in the resulting view, relative to the first neuron in this object.
endis the index of the last-plus-one neuron in the resulting view, relative to the first neuron in this object.
Returns
a new view representing only the given range of neurons.
PopulationView< T > cypress::ViewableMixin< PopulationView< T > , PopulationView< T > , Accessor >::operator() ( NeuronIndex  begin,
NeuronIndex  end 
)
inlineinherited

Returns a View object representing a range of neurons relative to this object.

Parameters
beginis the index of the first neuron in the resulting view, relative to the first neuron in this object.
endis the index of the last-plus-one neuron in the resulting view, relative to the first neuron in this object.
Returns
a new view representing only the given range of neurons.
Neuron< T > cypress::IterableMixin< PopulationView< T > , Neuron< T > , Accessor >::operator() ( NeuronIndex  i)
inlineinherited

Returns a reference at the i-th neuron in the Population or PopulationView. For neurons, only the index zero is allowed, providing access at the neuron itself.

const Neuron< T > cypress::IterableMixin< PopulationView< T > , Neuron< T > , Accessor >::operator() ( NeuronIndex  i) const
inlineinherited

Returns a const-reference at the i-th neuron. For neurons, only the index zero is allowed, providing access at the neuron itself.

bool cypress::DataMixin< PopulationView< T > , Accessor, T::Parameters , T::Signals >::operator< ( const Other &  o) const
inlineinherited
bool cypress::DataMixin< PopulationView< T > , Accessor, T::Parameters , T::Signals >::operator<= ( const Other &  o) const
inlineinherited
bool cypress::DataMixin< PopulationView< T > , Accessor, T::Parameters , T::Signals >::operator== ( const Other &  o) const
inlineinherited
bool cypress::DataMixin< PopulationView< T > , Accessor, T::Parameters , T::Signals >::operator> ( const Other &  o) const
inlineinherited
bool cypress::DataMixin< PopulationView< T > , Accessor, T::Parameters , T::Signals >::operator>= ( const Other &  o) const
inlineinherited
Neuron< T > cypress::IterableMixin< PopulationView< T > , Neuron< T > , Accessor >::operator[] ( NeuronIndex  i)
inlineinherited

Returns a reference at the i-th neuron in the Population or PopulationView. For neurons, only the index zero is allowed, providing access at the neuron itself.

const Neuron< T > cypress::IterableMixin< PopulationView< T > , Neuron< T > , Accessor >::operator[] ( NeuronIndex  i) const
inlineinherited

Returns a const-reference at the i-th neuron. For neurons, only the index zero is allowed, providing access at the neuron itself.

const T::Parameters cypress::DataMixin< PopulationView< T > , Accessor, T::Parameters , T::Signals >::parameters ( ) const
inlineinherited

Returns an object which can be used for reading the parameters of the neurons represented by this object. Note that read access may be constrained when the parameters in the underlying neurons do not possess the same parameters.

T::Parameters cypress::DataMixin< PopulationView< T > , Accessor, T::Parameters , T::Signals >::parameters ( )
inlineinherited

Returns an object which can be used for setting the parameters of the neurons. Note that read access may be constrained when the parameters in the underlying neurons do not possess the same parameters.

template<typename T >
PopulationIndex cypress::PopulationView< T >::pid ( ) const
inline

Returns the population index of this population.

Returns
the population index of this population.
const PopulationView< T > cypress::ViewableMixin< PopulationView< T > , PopulationView< T > , Accessor >::range ( NeuronIndex  begin,
NeuronIndex  end 
) const
inlineinherited

Returns a constant View object representing a range of neurons relative to this object.

Parameters
beginis the index of the first neuron in the resulting view, relative to the first neuron in this object.
endis the index of the last-plus-one neuron in the resulting view, relative to the first neuron in this object.
Returns
a new view representing only the given range of neurons.
PopulationView< T > cypress::ViewableMixin< PopulationView< T > , PopulationView< T > , Accessor >::range ( NeuronIndex  begin,
NeuronIndex  end 
)
inlineinherited

Returns a View object representing a range of neurons relative to this object.

Parameters
beginis the index of the first neuron in the resulting view, relative to the first neuron in this object.
endis the index of the last-plus-one neuron in the resulting view, relative to the first neuron in this object.
Returns
a new view representing only the given range of neurons.
reverse_iterator cypress::IterableMixin< PopulationView< T > , Neuron< T > , Accessor >::rbegin ( )
inlineinherited
const_reverse_iterator cypress::IterableMixin< PopulationView< T > , Neuron< T > , Accessor >::rbegin ( ) const
inlineinherited
reverse_iterator cypress::IterableMixin< PopulationView< T > , Neuron< T > , Accessor >::rend ( )
inlineinherited
const_reverse_iterator cypress::IterableMixin< PopulationView< T > , Neuron< T > , Accessor >::rend ( ) const
inlineinherited
const T::Signals cypress::DataMixin< PopulationView< T > , Accessor, T::Parameters , T::Signals >::signals ( ) const
inlineinherited

Returns an object which can be used for reading the record flags and the recorded data.

T::Signals cypress::DataMixin< PopulationView< T > , Accessor, T::Parameters , T::Signals >::signals ( )
inlineinherited

Returns an object which can be used for reading and writing the record flags and the recorded data.

size_t cypress::IterableMixin< PopulationView< T > , Neuron< T > , Accessor >::size ( )
inlineinherited

Returns the size of the population or population view. For single neurons the size is always one.

template<typename T >
const NeuronType& cypress::PopulationView< T >::type ( ) const
inline

Returns the type of the population.

Returns
a reference at the neuron type descriptor.

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