From: Pecevski D. <de...@ig...> - 2009-04-23 14:03:02
|
Hi Mathieu, Mathieu Dubois wrote: > Hello PCSIMers, > > Sorry to bother you again but I was wondering why ConnectionsProjection > doesn't inherit from SimObjectPopulation? > > I ask the question because I often want to create recorders for a whole > ConnectionsProjection (for instance to record the psr). With a > SimObjectPopulation, it's easy: the record method is here for that. But > AFAIK there is no equivalent method in ConnectionsProjection. So I often > have to create a population from a ConnectionsProjection with something > like syn_popul = SimObjectPopulation( proj.idVector() ). > The is not any strong reason why ConnectionsProjection does not inherit from SimObjectPopulation. There is a difference in the behavior of ConnectionsProjection in distributed modes of simulation that does not conform to the definition of the SimObjectPopulation, like for example, it's possible to specify collectIDs = false, in the ConnectionsProjection which saves memory by not storing the ids of the synapses. Also in some distributed construction algorithms, a ConnectionsProjection instance on one MPI node stores the IDs of the synapses that are located on the particular node, whereas a SimObjectPopulation in distributed mode is expected to hold the all IDs of SimObjects over all nodes. Nevertheless, in spite of these differences which can be explicitly pointed out in the documentation in order to avoid confusion and reconciled with error messages in the interface if the IDs are not present in the projection, it should be in principle possible to make ConnectionsProjection inherit from SimObjectPopulation, and we have considered it. It's not done since other things had higher priority. For recording variables from synapses I also create a SimObjectPopulation from the ID vector of synapses. It's possible that the interface is extended with this feature in the future. > Also why ConnectionsProjection doesn't store information about the > source and destination populations? Therefore we could write something > like proj.getSourcePopulation (which again could be useful in my case). > This is also a possibility that is not yet implemented. Usually in a script when you create a ConnectionsProjection, you can keep the python references to both source and dest. populations that you can use afterwards, therefore we didn't consider it important or necessary to add it so far. However, I have noted this, and we will consider to change this in the future. Thank you for your suggestions. best, Dejan > I don't criticize PCSIM's API, it's wonderful. I was just asking the > question. Maybe I am missing something? > > Thanks, > Mathieu > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Pcsim-users mailing list > Pcs...@li... > https://lists.sourceforge.net/lists/listinfo/pcsim-users > -- _______________________________________________ Dejan Pecevski Institute for Theoretical Computer Science Graz University of Technology Inffeldgasse 16b, A-8010 Graz, Austria Tel. +43 316 873 5849 |