#include <DegreeDistributionConnections.h>


Public Types | |
| enum | DegreeType { incoming, outgoing } |
| In- or out degree. More... | |
Public Member Functions | |
| DegreeDistributionConnections (RandomDistribution const &distribution, DegreeType degreeType) | |
| New DegreeDistributionConnections object with given distribution for the either in or out degree. | |
| virtual | ~DegreeDistributionConnections () |
| virtual void | init (const SimObjectPopulation &source, const SimObjectPopulation &destination) |
| Tell the iterator about the populations to connect. | |
| virtual void | reset (SimObject::ID::SortedVector::const_iterator src_begin_it, SimObject::ID::SortedVector::const_iterator src_end_it, SimObject::ID::SortedVector::const_iterator dest_begin_it, SimObject::ID::SortedVector::const_iterator dest_end_it) |
| 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. | |
| virtual size_t | estimate () |
| Return an estimated number of connections which will be generated (if possible). | |
Protected Attributes | |
| RandomDistribution * | dist |
| DegreeType | degree_type |
| const SimObjectPopulation * | src_popul |
| const SimObjectPopulation * | dest_popul |
| unsigned | curr_degree |
| unsigned | curr_made_connections |
| SimObject::ID::SortedVector::const_iterator | from_begin_it |
| unsigned | from_seq_size |
| SimObject::ID::SortedVector::const_iterator | curr_to_it |
| SimObject::ID::SortedVector::const_iterator | to_end_it |
| SimpleNonRepeatRandomNG | nonrepeat_rng |
Definition at line 21 of file DegreeDistributionConnections.h.
| DegreeDistributionConnections::DegreeDistributionConnections | ( | RandomDistribution const & | distribution, | |
| DegreeType | degreeType | |||
| ) |
New DegreeDistributionConnections object with given distribution for the either in or out degree.
| distribution | The random distribution (e.g. ConstantNumber or BinomialDistribution) | |
| degreeType | Define either in or out degree: incoming or outgoing |
Definition at line 13 of file DegreeDistributionConnections.cpp.
References RandomDistribution::clone(), and dist.

| DegreeDistributionConnections::~DegreeDistributionConnections | ( | ) | [virtual] |
| void DegreeDistributionConnections::init | ( | const SimObjectPopulation & | src, | |
| const SimObjectPopulation & | dst | |||
| ) | [virtual] |
Tell the iterator about the populations to connect.
Implements ConnectionIterator.
Definition at line 26 of file DegreeDistributionConnections.cpp.
References dest_popul, and src_popul.
| void DegreeDistributionConnections::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 33 of file DegreeDistributionConnections.cpp.
References curr_degree, curr_made_connections, curr_to_it, degree_type, dist, from_begin_it, from_seq_size, incoming, nonrepeat_rng, SimpleNonRepeatRandomNG::reset(), and to_end_it.

| bool DegreeDistributionConnections::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 61 of file DegreeDistributionConnections.cpp.
References curr_degree, curr_made_connections, curr_to_it, degree_type, dist, from_begin_it, from_seq_size, incoming, ConnectionIterator::last_conn_idx, ConnectionIterator::last_conn_valid, ConnectionIterator::m_rnd_eng, nonrepeat_rng, SimpleNonRepeatRandomNG::reset(), and to_end_it.

| virtual size_t DegreeDistributionConnections::estimate | ( | ) | [inline, virtual] |
Return an estimated number of connections which will be generated (if possible).
Reimplemented from ConnectionIterator.
Definition at line 45 of file DegreeDistributionConnections.h.
RandomDistribution* DegreeDistributionConnections::dist [protected] |
Definition at line 47 of file DegreeDistributionConnections.h.
Referenced by DegreeDistributionConnections(), next(), reset(), and ~DegreeDistributionConnections().
DegreeType DegreeDistributionConnections::degree_type [protected] |
const SimObjectPopulation* DegreeDistributionConnections::src_popul [protected] |
const SimObjectPopulation* DegreeDistributionConnections::dest_popul [protected] |
unsigned DegreeDistributionConnections::curr_degree [protected] |
unsigned DegreeDistributionConnections::curr_made_connections [protected] |
unsigned DegreeDistributionConnections::from_seq_size [protected] |
1.5.5