8 #ifndef IMPMISC_LOG_PAIR_SCORE_H
9 #define IMPMISC_LOG_PAIR_SCORE_H
11 #include <IMP/misc/misc_config.h>
14 #include <boost/unordered_map.hpp>
16 IMPMISC_BEGIN_NAMESPACE
22 mutable boost::unordered_map<ParticlePair, unsigned int> map_;
27 virtual double evaluate_index(
Model *m,
41 unsigned int>::const_iterator it = map_.begin();
42 it != map_.end(); ++it) {
43 ret.push_back(it->first);
51 return map_.find(pp) != map_.end();
58 inline Float LogPairScore::evaluate_index(
Model *m,
62 if (map_.find(pp) == map_.end()) {
Particle * get_particle(ParticleIndex p) const
Get the particle from an index.
Abstract class for scoring object(s) of type ParticleIndexPair.
#define IMP_PAIR_SCORE_METHODS(Name)
A class to store an fixed array of same-typed values.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Track the pairs of particles passed.
LogPairScore()
create with an empty map
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
Class for storing model, its restraints, constraints, and particles.
virtual ModelObjectsTemp do_get_inputs(Model *, const ParticleIndexes &) const
void clear()
Clear the lst of pairs.
double Float
Basic floating-point value (could be float, double...)
bool get_contains(const ParticlePair &pp) const
Return true if the pair is in the list.
ParticlePairsTemp get_particle_pairs() const
Get a list of all pairs (without multiplicity)
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Class for adding derivatives from restraints to the model.
Various important functionality for implementing decorators.