DegreeDistributionConnections Class Reference

This ConnectionIterator generates connections such the either the in or out degree of a SimObject in the population follows a given probability distribution. More...

#include <DegreeDistributionConnections.h>

Inheritance diagram for DegreeDistributionConnections:

Inheritance graph
[legend]
Collaboration diagram for DegreeDistributionConnections:

Collaboration graph
[legend]

List of all members.

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

RandomDistributiondist
DegreeType degree_type
const SimObjectPopulationsrc_popul
const SimObjectPopulationdest_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


Detailed Description

This ConnectionIterator generates connections such the either the in or out degree of a SimObject in the population follows a given probability distribution.

Attention:
This class works only together with the SimpleAllToAllWiringMethod

Definition at line 21 of file DegreeDistributionConnections.h.


Member Enumeration Documentation

In- or out degree.

Enumerator:
incoming 
outgoing 

Definition at line 25 of file DegreeDistributionConnections.h.


Constructor & Destructor Documentation

DegreeDistributionConnections::DegreeDistributionConnections ( RandomDistribution const &  distribution,
DegreeType  degreeType 
)

New DegreeDistributionConnections object with given distribution for the either in or out degree.

Parameters:
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.

Here is the call graph for this function:

DegreeDistributionConnections::~DegreeDistributionConnections (  )  [virtual]

Definition at line 20 of file DegreeDistributionConnections.cpp.

References dist.


Member Function Documentation

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.

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.

Here is the call graph for this function:

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.

Here is the call graph for this function:

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.


Member Data Documentation

Definition at line 53 of file DegreeDistributionConnections.h.

Referenced by next(), and reset().

Definition at line 55 of file DegreeDistributionConnections.h.

Referenced by init().

Definition at line 56 of file DegreeDistributionConnections.h.

Referenced by init().

Definition at line 58 of file DegreeDistributionConnections.h.

Referenced by next(), and reset().

Definition at line 59 of file DegreeDistributionConnections.h.

Referenced by next(), and reset().

Definition at line 61 of file DegreeDistributionConnections.h.

Referenced by next(), and reset().

Definition at line 63 of file DegreeDistributionConnections.h.

Referenced by next(), and reset().

Definition at line 65 of file DegreeDistributionConnections.h.

Referenced by next(), and reset().

Definition at line 66 of file DegreeDistributionConnections.h.

Referenced by next(), and reset().

Definition at line 68 of file DegreeDistributionConnections.h.

Referenced by next(), and reset().


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

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