#include <ConnectionsProjection.h>
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. | |
SimObject * | object (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 | |
SimNetwork * | net |
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. |
Definition at line 37 of file ConnectionsProjection.h.
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.
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.
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.
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.
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.
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().
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.
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().
virtual ConnectionsProjection::~ConnectionsProjection | ( | ) | [inline, virtual] |
SimObject::ID::Packed ConnectionsProjection::operator[] | ( | int | idx | ) | const [inline] |
Return the ID (packed) of the connector SimObject with the given connection index.
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.
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.
Definition at line 142 of file ConnectionsProjection.h.
References collectPairs, and connectPairs.
Return a pointer to the connector SimObject with the given connection index.
Definition at line 154 of file ConnectionsProjection.h.
References collectIDs, connector_ids, net, and SimNetwork::object().
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.
SimNetwork* ConnectionsProjection::net [protected] |
Reference to the network to which the porjection belongs.
Definition at line 172 of file ConnectionsProjection.h.
Referenced by object().
bool ConnectionsProjection::collectIDs [protected] |
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().
bool ConnectionsProjection::collectPairs [protected] |
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().