[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[IMP-dev] proposal to narrow container interfaces



Right now, containers in IMP (ie SingletonContainer, PairContainer), support looking at the particles via (for a SingletonContainer)
1) get_particles()
2) iterate through the particles
3) a for loop on the indexes and using get_particle()
4) applying a SingletonModifier or SingletonScore

2 and 3 are quite limiting and effectively eliminate the ability to use containers where it is non-trivial to predict how many items the container will contain without generating them all. More concretely, it eliminates the possibility of using filters with the AllPairContainer and other similar containers (or at least makes it very difficult). I would like to remove 2 and 3. No python code is likely to be affected as it probably all uses the get_particles() equivalebts and I can fix all the code in IMP svn (which most likely uses 3). How much would such a change be likely to affect people? To get an idea, search for get_numer_of_particles() and get_number_of_particle_pairs() in your c++ code. Thanks.