ConnectionsProjection Class Reference

Class for making connections between populations of SimObjects. More...

#include <ConnectionsProjection.h>

Collaboration diagram for ConnectionsProjection:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ConnectionsProjection (shared_ptr< SimObjectPopulation > source, shared_ptr< SimObjectPopulation > destination, SimObjectFactory &connector, ConnectionIterator &iterator, WiringMethod *wiring=NULL, bool collectIDs=false, bool collectPairs=false)
 Make connections between source and dest. population using a SimObjectFactory (usually some synapse) to connect the objects.
 ConnectionsProjection (shared_ptr< SimObjectPopulation > source, shared_ptr< SimObjectPopulation > destination, ConnObjectFactory &connector, ConnectionIterator &iterator, WiringMethod *wiring=NULL, bool collectIDs=false, bool collectPairs=false)
 Make connections between source and dest. population using a ConnObjectFactory (usually some synapse) to connect the objects.
 ConnectionsProjection (const SimObjectPopulation &source, const SimObjectPopulation &destination, ConnectionIterator &iterator, WiringMethod *wiring=NULL, bool collectPairs=false)
 Make connections between source and dest. population to directly connect the objects, i.e. there is not connector SimObjectFactory.
 ConnectionsProjection (const SimObjectPopulation &source, const SimObjectPopulation &destination, Time &delay, bool collectPairs=false)
 Connect each SimObject in the source population to its corresponding (by index) SimObject in the destination population, i.e. a one-to-one connection.
virtual ~ConnectionsProjection ()
 Nothing to do but beeing virtual.
SimObject::ID::Packed operator[] (int idx) const
 Return the ID (packed) of the connector SimObject with the given connection index.
SimObject::ID operator() (int idx) const
 Return the ID (non-packed) of the connector SimObject with the given connection index.
pair< SimObject::ID,
SimObject::ID
prePostPair (int idx) const
 Return the pair of TODO.
SimObjectobject (int idx) const
 Return a pointer to the connector SimObject with the given connection index.
const vector
< SimObject::ID::Packed > & 
idVector () const
 Return the vector of SimObject::ID's if collectPairs == true.
size_t size () const
 Return the number of connections which have been made.

Protected Attributes

SimNetworknet
 Reference to the network to which the porjection belongs.
bool collectIDs
 Flag which idicates whether the SimObject::ID's of the generated connector objects were collected or not.
bool collectPairs
 Flag which idicates wheter the pairs of ID's of the connected objects were collected or not.
SimObject::ID::Vector connector_ids
 Vector of collected SimObject::ID's.
WiringMethod::ConnectPairsVector connectPairs
 Vector of pairs of connected references to objects.


Detailed Description

Class for making connections between populations of SimObjects.

See also:
ConnectionIterator, SimObjectPopulation, WiringMethod

Definition at line 37 of file ConnectionsProjection.h.


Constructor & Destructor Documentation

ConnectionsProjection::ConnectionsProjection ( shared_ptr< SimObjectPopulation source,
shared_ptr< SimObjectPopulation destination,
SimObjectFactory connector,
ConnectionIterator iterator,
WiringMethod wiring = NULL,
bool  collectIDs = false,
bool  collectPairs = false 
)

Make connections between source and dest. population using a SimObjectFactory (usually some synapse) to connect the objects.

Parameters:
source The source population
destination The destination population (can be the same as source population)
connector The SimObjectFactory to use to generate connecting objects (e.g. StaticSpikingSynapse)
iterator The connection iterator to use (e.g. PredicateBasedConnections or RandomConnections ) which determines which connections are made.
wiring The WiringMethod to use
collectIDs Flag which idicates whether the SimObject::ID's of the generated connector objects should be collected or not.
collectPairs Flaf which idicates wheter the pairs of ID's of the connected objects souble be collected or not. Be aware that the collected ID's or indices are collected on each node of a distributed simulation when usin a DistributedSingleThreadNetwork or DistributedMultiThreadNetwork which may lead to a large memory consumption.

Definition at line 13 of file ConnectionsProjection.cpp.

References WiringMethod::connect(), connector_ids, and connectPairs.

Here is the call graph for this function:

ConnectionsProjection::ConnectionsProjection ( shared_ptr< SimObjectPopulation source,
shared_ptr< SimObjectPopulation destination,
ConnObjectFactory connector,
ConnectionIterator iterator,
WiringMethod wiring = NULL,
bool  collectIDs = false,
bool  collectPairs = false 
)

Make connections between source and dest. population using a ConnObjectFactory (usually some synapse) to connect the objects.

Parameters:
source The source population
destination The destination population (can be the same as source population)
connector The ConnObjectFactory to use to generate connecting objects (e.g. StaticSpikingSynapse)
iterator The connection iterator to use (e.g. PredicateBasedConnections or RandomConnections ) which determines which connections are made.
wiring The WiringMethod to use
collectIDs Flag which idicates whether the SimObject::ID's of the generated connector objects should be collected or not.
collectPairs Flaf which idicates wheter the pairs of ID's of the connected objects souble be collected or not. Be aware that the collected ID's or indices are collected on each node of a distributed simulation when usin a DistributedSingleThreadNetwork or DistributedMultiThreadNetwork which may lead to a large memory consumption.

Definition at line 34 of file ConnectionsProjection.cpp.

References WiringMethod::connect(), connector_ids, and connectPairs.

Here is the call graph for this function:

ConnectionsProjection::ConnectionsProjection ( const SimObjectPopulation source,
const SimObjectPopulation destination,
ConnectionIterator iterator,
WiringMethod wiring = NULL,
bool  collectPairs = false 
)

Make connections between source and dest. population to directly connect the objects, i.e. there is not connector SimObjectFactory.

Parameters:
source The source population
destination The destination population (can be the same as source population)
iterator The connection itertor to use (e.g. PredicateBasedConnections or RandomConnections )
wiring The WiringMethod to use
collectPairs Flag which idicates wheter the pairs of ID's of the connected objects souble be collected or not. Be aware that the collected pairs are collected on each node of a distributed simulation when usin a DistributedSingleThreadNetwork or DistributedMultiThreadNetwork which may lead to a large memory consumption.

Definition at line 56 of file ConnectionsProjection.cpp.

References WiringMethod::connect(), connector_ids, connectPairs, and SimObjectPopulation::getNet().

Here is the call graph for this function:

ConnectionsProjection::ConnectionsProjection ( const SimObjectPopulation source,
const SimObjectPopulation destination,
Time delay,
bool  collectPairs = false 
)

Connect each SimObject in the source population to its corresponding (by index) SimObject in the destination population, i.e. a one-to-one connection.

Parameters:
source The source population
destination The destination population (can be the same as source population)
delay The amount of delay to introduce
collectPairs Flag which idicates wheter the pairs of ID's of the connected objects souble be collected or not. Be aware that the collected pairs are collected on each node of a distributed simulation when usin a DistributedSingleThreadNetwork or DistributedMultiThreadNetwork which may lead to a large memory consumption.

Definition at line 78 of file ConnectionsProjection.cpp.

References connectPairs, and SimObjectPopulation::getNet().

Here is the call graph for this function:

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

Nothing to do but beeing virtual.

Definition at line 112 of file ConnectionsProjection.h.


Member Function Documentation

SimObject::ID::Packed ConnectionsProjection::operator[] ( int  idx  )  const [inline]

Return the ID (packed) of the connector SimObject with the given connection index.

Note:
SimObject::ID::Invalid.packed() is returned if collectIDs == false during connecting

Definition at line 118 of file ConnectionsProjection.h.

References collectIDs, and connector_ids.

SimObject::ID ConnectionsProjection::operator() ( int  idx  )  const [inline]

Return the ID (non-packed) of the connector SimObject with the given connection index.

Note:
SimObject::ID::Invalid is returned if collectIDs == false during connecting

Definition at line 130 of file ConnectionsProjection.h.

References collectIDs, connector_ids, and SimObject::ID::Invalid.

pair<SimObject::ID, SimObject::ID> ConnectionsProjection::prePostPair ( int  idx  )  const [inline]

Return the pair of TODO.

Note:
A pair of invalid ID's (SimObject::ID::Invalid) is returned if collectPairs == false during connecting

Definition at line 142 of file ConnectionsProjection.h.

References collectPairs, and connectPairs.

SimObject* ConnectionsProjection::object ( int  idx  )  const [inline]

Return a pointer to the connector SimObject with the given connection index.

Note:
NULL is returned if the object is not stored locally on the calling (MPI) node or if collectIDs == false

Definition at line 154 of file ConnectionsProjection.h.

References collectIDs, connector_ids, net, and SimNetwork::object().

Here is the call graph for this function:

const vector<SimObject::ID::Packed>& ConnectionsProjection::idVector (  )  const [inline]

Return the vector of SimObject::ID's if collectPairs == true.

Definition at line 162 of file ConnectionsProjection.h.

References connector_ids.

size_t ConnectionsProjection::size (  )  const [inline]

Return the number of connections which have been made.

Definition at line 167 of file ConnectionsProjection.h.

References collectIDs, and connector_ids.


Member Data Documentation

Reference to the network to which the porjection belongs.

Definition at line 172 of file ConnectionsProjection.h.

Referenced by object().

Flag which idicates whether the SimObject::ID's of the generated connector objects were collected or not.

Definition at line 179 of file ConnectionsProjection.h.

Referenced by object(), operator()(), operator[](), and size().

Flag which idicates wheter the pairs of ID's of the connected objects were collected or not.

Definition at line 182 of file ConnectionsProjection.h.

Referenced by prePostPair().

Vector of collected SimObject::ID's.

Definition at line 185 of file ConnectionsProjection.h.

Referenced by ConnectionsProjection(), idVector(), object(), operator()(), operator[](), and size().

Vector of pairs of connected references to objects.

Definition at line 188 of file ConnectionsProjection.h.

Referenced by ConnectionsProjection(), and prePostPair().


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