AugmentedSpatialPopulation Class Reference

#include <AugmentedSpatialPopulation.h>

Inheritance diagram for AugmentedSpatialPopulation:

Inheritance graph
[legend]
Collaboration diagram for AugmentedSpatialPopulation:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 AugmentedSpatialPopulation (SimNetwork &net, vector< shared_ptr< PopObjectAttributeFactory > > const &families, SpatialFamilyIDGenerator const &fidgen, shared_ptr< Point3DSet > locs)
 Create a population by mixing objects generated from different factories.
 AugmentedSpatialPopulation (SimNetwork &net, shared_ptr< PopObjectAttributeFactory > family, shared_ptr< Point3DSet > locs)
 Create a population by generating objects from one one family for each point in Point3DSet.
 AugmentedSpatialPopulation (vector< shared_ptr< AugmentedSpatialPopulation > > const &pops)
 Creates a population by combining the objects from several populations into one population.
virtual ~AugmentedSpatialPopulation ()
 Destruct me.
SimObjectAttributes const & getAttributesAt (Point3D< double > const &p) const
 Returns the SimObjectAttributes of the SimObject at location p.
SimObjectAttributes const & getAttributesAt (double const &x, double const &y, double const &z) const
 Returns the SimObjectAttributes of the SimObject at location (x,y,z).
SimObjectAttributes const & getAttributes (size_t index) const
 Returns the SimObjectAttributes of the object with the given index.

Protected Member Functions

 AugmentedSpatialPopulation (SimNetwork *net, vector< SimObject::ID::Packed > const &objIDs, vector< familyid_t > const &famIDs, vector< shared_ptr< SimObjectAttributes > > const &attrs, shared_ptr< Point3DSet > locs)
 Constructor used by new_subset.
virtual
AugmentedSpatialPopulation
new_subset (vector< size_t > const &indices) const
 Return a new AugmentedSpatialPopulation which is a subset specified by the given set of indices.
void populate (vector< shared_ptr< PopObjectAttributeFactory > > const &families)
 Actually generate the simulation objects for the given set of families.


Detailed Description

Extension of the SpatialFamilyPopulation class. Other than spatial coordinates and family IDs, it uses also SimObjectAttributes objects to identify the SimObject-s that are members of the population. The SimObjectAttributes object represents an extensible set of properties, which allows for implementation of populations with SimObjects which have diverse set of attributes.

The SimObjectIdentity attributes can be used then in the construction of the connections, in determining connector (synapse) parameters etc.

Definition at line 30 of file AugmentedSpatialPopulation.h.


Constructor & Destructor Documentation

AugmentedSpatialPopulation::AugmentedSpatialPopulation ( SimNetwork net,
vector< shared_ptr< PopObjectAttributeFactory > > const &  families,
SpatialFamilyIDGenerator const &  fidgen,
shared_ptr< Point3DSet locs 
)

Create a population by mixing objects generated from different factories.

For construction, an array of PopObjectAttributeFactory is provided where each PopObjectAttributeFactory defines one family of simulation objects. The SpatialFamilyIDGenerator chooses among the factories/families at each object creation step which is carried out for each location in the Point3DSet.

Parameters:
net The SimNetwork to which ths population belongs
families Vector of PopObjectAttributeFactory's. Each element defines one family of SimObject's.
fidgen This SpatialFamilyIDGenerator defines how the families are distibuted
locs The set of points where to place the SimObject's
Attention:
The network net must not be deleted until the SpatialFamilyPopulation constructed is deleted.

Definition at line 20 of file AugmentedSpatialPopulation.cpp.

References SpatialFamilyPopulation::familyIDs, SpatialFamilyIDGenerator::generateIDs(), SimObjectPopulation::id_vec, SpatialSimObjectPopulation::locations, populate(), and SimObjectPopulation::shr_ptr_vec.

Referenced by new_subset().

Here is the call graph for this function:

AugmentedSpatialPopulation::AugmentedSpatialPopulation ( SimNetwork net,
shared_ptr< PopObjectAttributeFactory family,
shared_ptr< Point3DSet locs 
)

Create a population by generating objects from one one family for each point in Point3DSet.

This constructor is just a shorthand where only one family of sim objects is needed.

Parameters:
net The SimNetwork to which ths population belongs
family The only family of objects in this popuation. All objects have family ID = 0.
locs The set of points where to place the SimObject's
Attention:
The network net must not be deleted until the SpatialFamilyPopulation constructed is deleted.

Definition at line 38 of file AugmentedSpatialPopulation.cpp.

References SpatialFamilyPopulation::familyIDs, SimObjectPopulation::id_vec, populate(), and SimObjectPopulation::shr_ptr_vec.

Here is the call graph for this function:

AugmentedSpatialPopulation::AugmentedSpatialPopulation ( vector< shared_ptr< AugmentedSpatialPopulation > > const &  pops  ) 

Creates a population by combining the objects from several populations into one population.

Here the information about the network is taken from the provided populations. An extra Point3DSet is allocated which stores the locations (copies from all inital populations) of objects.

Attention:
The network referenced by the initial set of populations must not be deleted until the AugmentedSpatialPopulation constructed is deleted.

Definition at line 53 of file AugmentedSpatialPopulation.cpp.

References attributes, SpatialFamilyPopulation::familyIDs, SpatialFamilyPopulation::getFamilyID(), SpatialSimObjectPopulation::getLocation(), SimObjectPopulation::getNet(), SimObjectPopulation::id_vec, SpatialSimObjectPopulation::locations, SimObjectPopulation::net, and SimObjectPopulation::shr_ptr_vec.

Here is the call graph for this function:

AugmentedSpatialPopulation::~AugmentedSpatialPopulation (  )  [virtual]

Destruct me.

Deletes all SimObjectAttributes

Definition at line 100 of file AugmentedSpatialPopulation.cpp.

AugmentedSpatialPopulation::AugmentedSpatialPopulation ( SimNetwork net,
vector< SimObject::ID::Packed > const &  objIDs,
vector< familyid_t > const &  famIDs,
vector< shared_ptr< SimObjectAttributes > > const &  attrs,
shared_ptr< Point3DSet locs 
) [protected]

Constructor used by new_subset.

Used internally by AugmentedSpatialPopulation::new_subset

Definition at line 189 of file AugmentedSpatialPopulation.cpp.


Member Function Documentation

SimObjectAttributes const & AugmentedSpatialPopulation::getAttributesAt ( Point3D< double > const &  p  )  const

Returns the SimObjectAttributes of the SimObject at location p.

Definition at line 142 of file AugmentedSpatialPopulation.cpp.

References getAttributes(), and SpatialSimObjectPopulation::locations.

Here is the call graph for this function:

SimObjectAttributes const & AugmentedSpatialPopulation::getAttributesAt ( double const &  x,
double const &  y,
double const &  z 
) const

Returns the SimObjectAttributes of the SimObject at location (x,y,z).

Definition at line 150 of file AugmentedSpatialPopulation.cpp.

References getAttributes(), and SpatialSimObjectPopulation::locations.

Here is the call graph for this function:

SimObjectAttributes const & AugmentedSpatialPopulation::getAttributes ( size_t  index  )  const

AugmentedSpatialPopulation * AugmentedSpatialPopulation::new_subset ( vector< size_t > const &  indices  )  const [protected, virtual]

Return a new AugmentedSpatialPopulation which is a subset specified by the given set of indices.

Reimplemented from SpatialFamilyPopulation.

Definition at line 170 of file AugmentedSpatialPopulation.cpp.

References AugmentedSpatialPopulation(), SpatialSimObjectPopulation::locations, and SimObjectPopulation::net.

Here is the call graph for this function:

void AugmentedSpatialPopulation::populate ( vector< shared_ptr< PopObjectAttributeFactory > > const &  families  )  [protected]

Actually generate the simulation objects for the given set of families.

Note:
Accesses this->familyIDs and this->locations and writes shr_ptr_vec and attributes

Definition at line 118 of file AugmentedSpatialPopulation.cpp.

References SimNetwork::addObject(), SimNetwork::getMainConstructRNGEngine(), SpatialSimObjectPopulation::locations, SimObjectPopulation::net, and SimObjectPopulation::shr_ptr_vec.

Referenced by AugmentedSpatialPopulation().

Here is the call graph for this function:


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