12#ifndef IMPKERNEL_PAIR_PREDICATE_H
13#define IMPKERNEL_PAIR_PREDICATE_H
15#include <IMP/kernel_config.h>
18#include "internal/container_helpers.h"
21IMPKERNEL_BEGIN_NAMESPACE
36 PairPredicate(std::string name =
"PairPredicate %1%");
38#if !defined(IMP_DOXYGEN) && !defined(SWIG)
72 for (
unsigned int i = 0; i < o.size(); ++i) {
73 ret[i] += get_value_index(m, o[i]);
81IMPKERNEL_END_NAMESPACE
Class for adding derivatives from restraints to the model.
Class for storing model, its restraints, constraints, and particles.
Object(std::string name)
Construct an object with the given name.
int operator()(Model *m, const ParticleIndexPair &vt) const
Enable them to be use as functors.
virtual int get_value_index(Model *m, const ParticleIndexPair &vt) const =0
Compute the predicate and the derivative if needed.
virtual int get_value_index_in_batch(Model *m, const ParticleIndexPair &vt) const
virtual void setup_for_get_value_index_in_batch(Model *) const
Base class for objects that take particle arguments and read from them.
Classes used in the construction of ModelObjects.
IMP::Vector< ParticleIndexPair, std::allocator< ParticleIndexPair > > ParticleIndexPairs
IMP::Vector< Int > Ints
Standard way to pass a bunch of Int values.
Array< 2, ParticleIndex > ParticleIndexPair
An ordered pair of particles, each identified by its ParticleIndex.
Array< 2, WeakPointer< Particle >, Particle * > ParticlePair
#define IMP_REF_COUNTED_DESTRUCTOR(Name)
Set up destructor for a ref counted object.