PredicateBasedConnections Class Reference

Implementation of a ConnectionIterator which connects each pair for which the given connection decisions predicate is true. More...

#include <PredicateBasedConnections.h>

Inheritance diagram for PredicateBasedConnections:

Inheritance graph
[legend]
Collaboration diagram for PredicateBasedConnections:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PredicateBasedConnections (shared_ptr< ConnectionDecisionPredicate > predicate)
 New iterator with a given predicate.
 PredicateBasedConnections (shared_ptr< ConnectionDecisionPredicate > predicate, MPI::Intracomm const &mpiComm)
 New iterator with a given predicate and MPI::Intracomm.
virtual ~PredicateBasedConnections ()
virtual void init (const SimObjectPopulation &src, const SimObjectPopulation &dst)
 Tell the iterator about the populations to connect.
virtual void reset (SimObject::ID::SortedVector::const_iterator src_begin, SimObject::ID::SortedVector::const_iterator src_end, SimObject::ID::SortedVector::const_iterator dst_begin, SimObject::ID::SortedVector::const_iterator dst_end)
 Reset/Prepare the iterator to connect src to dst (specified by the begin and end iterators).
virtual bool next (pair< SimObject::ID, SimObject::ID > &connection)
 Move on to the next connection. If true is returned the connection pair is set properly.


Detailed Description

Implementation of a ConnectionIterator which connects each pair for which the given connection decisions predicate is true.

Definition at line 22 of file PredicateBasedConnections.h.


Constructor & Destructor Documentation

PredicateBasedConnections::PredicateBasedConnections ( shared_ptr< ConnectionDecisionPredicate predicate  ) 

New iterator with a given predicate.

Definition at line 19 of file PredicateBasedConnections.cpp.

PredicateBasedConnections::PredicateBasedConnections ( shared_ptr< ConnectionDecisionPredicate predicate,
MPI::Intracomm const &  mpiComm 
)

New iterator with a given predicate and MPI::Intracomm.

Definition at line 25 of file PredicateBasedConnections.cpp.

virtual PredicateBasedConnections::~PredicateBasedConnections (  )  [inline, virtual]

Definition at line 32 of file PredicateBasedConnections.h.


Member Function Documentation

void PredicateBasedConnections::init ( const SimObjectPopulation src,
const SimObjectPopulation dst 
) [virtual]

Tell the iterator about the populations to connect.

Implements ConnectionIterator.

Definition at line 30 of file PredicateBasedConnections.cpp.

References ConnectionIterator::m_rnd_eng.

Reset/Prepare the iterator to connect src to dst (specified by the begin and end iterators).

Implements ConnectionIterator.

Definition at line 36 of file PredicateBasedConnections.cpp.

bool PredicateBasedConnections::next ( pair< SimObject::ID, SimObject::ID > &  connection  )  [virtual]

Move on to the next connection. If true is returned the connection pair is set properly.

Implements ConnectionIterator.

Definition at line 53 of file PredicateBasedConnections.cpp.

References SimObjectPopulation::getID(), ConnectionIterator::last_conn_idx, ConnectionIterator::last_conn_valid, and ConnectionIterator::m_rnd_eng.

Here is the call graph for this function:


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

Generated on Wed Jul 9 16:34:52 2008 for PCSIM by  doxygen 1.5.5