9 #ifndef IMPKERNEL_PARTICLE_INDEX_H
10 #define IMPKERNEL_PARTICLE_INDEX_H
12 #include <IMP/kernel_config.h>
14 #include <boost/shared_ptr.hpp>
16 IMPKERNEL_BEGIN_NAMESPACE
22 IMPKERNELEXPORT ParticleIndexes
get_indexes(
const ParticlesTemp &ps);
25 IMPKERNELEXPORT ParticlesTemp
43 #if !defined(SWIG) && !defined(IMP_DOXYGEN) && !defined(IMP_SWIG_WRAPPER)
51 boost::shared_ptr<ParticleIndexes> tmp_;
59 for (
unsigned int i = 0; i < ps.size(); ++i) {
60 (*tmp_)[i] = ps[i].get_particle_index();
70 typedef ParticleIndexes::value_type value_type;
71 typedef ParticleIndexes::const_reference reference;
72 typedef ParticleIndexes::const_pointer pointer;
73 typedef ParticleIndexes::size_type size_type;
74 typedef ParticleIndexes::const_reference const_reference;
75 typedef ParticleIndexes::const_pointer const_pointer;
77 ParticleIndex operator[](
unsigned int i)
const {
return (*val_)[i]; }
78 unsigned int size()
const {
return val_->size(); }
79 typedef ParticleIndexes::const_iterator const_iterator;
80 typedef ParticleIndexes::const_iterator iterator;
81 const_iterator begin()
const {
return val_->begin(); }
82 const_iterator end()
const {
return val_->end(); }
99 for (
unsigned int i = 0; i < ps.size(); ++i) {
101 ps[i][1].get_particle_index());
111 IMPKERNEL_END_NAMESPACE
Smart pointer to Object-derived classes that does not refcount.
IMP::Vector< ParticleIndexPair > ParticleIndexPairs
Index< ParticleIndexTag > ParticleIndex
ParticlesTemp get_particles(Model *m, const ParticleIndexes &ps)
A smart pointer to a reference counted object.
ParticleIndexPairs get_indexes(const ParticlePairsTemp &ps)
Interface to specialized Particle types (e.g. atoms)
IMP::Vector< ParticlePair > ParticlePairsTemp
Class to handle individual particles of a Model object.