12 #ifndef IMPCORE_SINGLETON_PREDICATES_H
13 #define IMPCORE_SINGLETON_PREDICATES_H
15 #include <IMP/core/core_config.h>
18 #include <boost/random.hpp>
19 #include "internal/container_helpers.h"
21 IMPCORE_BEGIN_NAMESPACE
30 std::string name =
"ConstSingletonPredicate%1%");
52 "UnorderedTypeSingletonPredicate%1%");
55 return internal::get_type_hash(m, pi);
73 "OrderedTypeSingletonPredicate%1%");
78 return internal::get_ordered_type_hash(types);
82 return internal::get_ordered_type_hash(m, pi);
100 return internal::get_all_same(m, pi);
113 mutable boost::uniform_real<double> rng_;
117 "CoinFlipSingletonPredicate%1%");
133 IMPCORE_END_NAMESPACE
virtual int get_value(kernel::Particle *vt) const
IMP::base::Vector< IMP::base::WeakPointer< kernel::ModelObject > > ModelObjectsTemp
virtual kernel::ModelObjectsTemp do_get_inputs(kernel::Model *m, const kernel::ParticleIndexes &pis) const
RandomNumberGenerator random_number_generator
A shared random number generator.
virtual kernel::ModelObjectsTemp do_get_inputs(kernel::Model *, const kernel::ParticleIndexes &) const
ParticlesTemp get_particles(kernel::Model *m, const ParticleIndexes &ps)
virtual kernel::ModelObjectsTemp do_get_inputs(kernel::Model *m, const kernel::ParticleIndexes &pis) const
Import IMP/kernel/singleton_macros.h in the namespace.
virtual int get_value_index(kernel::Model *m, kernel::ParticleIndex pi) const
Compute the predicate and the derivative if needed.
virtual int get_value_index(kernel::Model *m, kernel::ParticleIndex pi) const
Compute the predicate and the derivative if needed.
Import IMP/kernel/SingletonPredicate.h in the namespace.
virtual int get_value_index(kernel::Model *, kernel::ParticleIndex) const
Compute the predicate and the derivative if needed.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
#define IMP_SINGLETON_PREDICATE_METHODS(Name)
Define extra the functions needed for a SingletonPredicate.
Abstract predicate function.
virtual int get_value_index(kernel::Model *m, kernel::ParticleIndex pi) const
Compute the predicate and the derivative if needed.
virtual kernel::ModelObjectsTemp do_get_inputs(kernel::Model *, const kernel::ParticleIndexes &) const
virtual kernel::ModelObjectsTemp do_get_inputs(kernel::Model *, const kernel::ParticleIndexes &) const
virtual int get_value_index(kernel::Model *, kernel::ParticleIndex) const
Compute the predicate and the derivative if needed.
Class for storing model, its restraints, constraints, and particles.