NEST  2.6.0,not_revisioned_source_dir@0
Public Types | Public Member Functions | Private Attributes | List of all members
nest::LocalNodeListBase< ListIterator > Class Template Reference

Template for list interface to network tree. More...

#include <nodelist.h>

Public Types

typedef ListIterator iterator
 

Public Member Functions

 LocalNodeListBase (Subnet &subnet)
 
iterator begin () const
 Return iterator pointing to first node in subnet. More...
 
iterator end () const
 Return iterator pointing to node past last node. More...
 
bool empty () const
 Returns true if no local nodes. More...
 
Subnetget_subnet () const
 Returns subnet wrapped by NodeList. More...
 
template<>
LocalNodeListBase
< LocalNodeListIterator >
::iterator 
begin () const
 
template<>
LocalNodeListBase
< LocalChildListIterator >
::iterator 
begin () const
 
template<>
LocalNodeListBase
< LocalLeafListIterator >
::iterator 
begin () const
 
template<>
LocalNodeListBase
< LocalNodeListIterator >
::iterator 
begin () const
 
template<>
LocalNodeListBase
< LocalChildListIterator >
::iterator 
begin () const
 
template<>
LocalNodeListBase
< LocalLeafListIterator >
::iterator 
begin () const
 

Private Attributes

Subnetsubnet_
 root of the network More...
 

Detailed Description

template<typename ListIterator>
class nest::LocalNodeListBase< ListIterator >

Template for list interface to network tree.

LocalNodeListBase provides a template for classes providing iterator interfaces to subnets. These iterators traverse only local nodes.

Concrete classes for local lists are created by instantiating LocalNodeListBase with suitable iterator classes and specializing the begin() method for those template instances.

Note
All iterators provided must either perform post-order iteration or specialize the end() method suitably, as the end() method provided by LocalNodeListBase assumes post-order traversal.
The list iterators provided here are not thread-safe. If you need to use then in threaded code, you must make sure that (a) each thread has its own list and iterator instances and (b) that no two threads manipulate the same node simultaneously.

Member Typedef Documentation

template<typename ListIterator>
typedef ListIterator nest::LocalNodeListBase< ListIterator >::iterator

Constructor & Destructor Documentation

template<typename ListIterator>
nest::LocalNodeListBase< ListIterator >::LocalNodeListBase ( Subnet subnet)
inlineexplicit

Member Function Documentation

template<typename ListIterator>
iterator nest::LocalNodeListBase< ListIterator >::begin ( ) const

Return iterator pointing to first node in subnet.

Must be defined by all derived classes.

Referenced by nest::Network::convergent_connect(), and nest::Network::random_convergent_connect().

template<typename ListIterator>
bool nest::LocalNodeListBase< ListIterator >::empty ( ) const
inline

Returns true if no local nodes.

References nest::Subnet::local_empty(), and nest::LocalNodeListBase< ListIterator >::subnet_.

template<typename ListIterator>
iterator nest::LocalNodeListBase< ListIterator >::end ( ) const
inline

Return iterator pointing to node past last node.

Note
Since traversal is post-order, the local_end() of the top-level subnet is the end also for Leaf and Child lists.

References nest::Subnet::local_end(), and nest::LocalNodeListBase< ListIterator >::subnet_.

Referenced by nest::Network::convergent_connect(), and nest::Network::random_convergent_connect().

template<typename ListIterator>
Subnet& nest::LocalNodeListBase< ListIterator >::get_subnet ( ) const
inline

Returns subnet wrapped by NodeList.

References nest::LocalNodeListBase< ListIterator >::subnet_.

Member Data Documentation

template<typename ListIterator>
Subnet& nest::LocalNodeListBase< ListIterator >::subnet_
private

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