#include <PredicateBasedConnections.h>
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. |
Definition at line 22 of file PredicateBasedConnections.h.
PredicateBasedConnections::PredicateBasedConnections | ( | shared_ptr< ConnectionDecisionPredicate > | predicate | ) |
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.
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.
void PredicateBasedConnections::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 | |||
) | [virtual] |
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.