#include <AugmentedSpatialPopulation.h>
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. |
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.
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.
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 |
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().
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.
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 |
Definition at line 38 of file AugmentedSpatialPopulation.cpp.
References SpatialFamilyPopulation::familyIDs, SimObjectPopulation::id_vec, populate(), and SimObjectPopulation::shr_ptr_vec.
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.
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.
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.
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.
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.
SimObjectAttributes const & AugmentedSpatialPopulation::getAttributes | ( | size_t | index | ) | const |
Returns the SimObjectAttributes of the object with the given index.
Definition at line 158 of file AugmentedSpatialPopulation.cpp.
Referenced by SimilarAttributeConnectionPredicate::decide(), LateralLongRangeOrientationConnectionPredicate::decide(), getAttributesAt(), and RetinotopicOrientationConnectionPredicate::init().
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.
void AugmentedSpatialPopulation::populate | ( | vector< shared_ptr< PopObjectAttributeFactory > > const & | families | ) | [protected] |
Actually generate the simulation objects for the given set of families.
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().