9 #ifndef IMPDOMINO_SUBSET_H
10 #define IMPDOMINO_SUBSET_H
12 #include <IMP/domino/domino_config.h>
21 IMPDOMINO_BEGIN_NAMESPACE
34 base::WeakPointer<kernel::Particle>, kernel::Particle *> {
38 std::sort(ps.begin(), ps.end());
47 for (
unsigned int i = 0; i < size(); ++i) {
50 for (
unsigned int i = 1; i < ps.size(); ++i) {
62 std::sort(ps.begin(), ps.end());
64 "Duplicate particles in set");
65 for (
unsigned int i = 0; i < ps.size(); ++i) {
70 kernel::Model *get_model()
const {
return operator[](0)->get_model(); }
71 std::string get_name()
const;
72 bool get_contains(
const Subset &o)
const {
73 return std::includes(begin(), end(), o.begin(), o.end());
82 set_union(a.begin(), a.end(), b.begin(), b.end(), std::back_inserter(pt));
88 set_intersection(a.begin(), a.end(), b.begin(), b.end(),
89 std::back_inserter(pt));
93 return Subset(pt,
true);
97 inline Subset get_difference(
const Subset &a,
const Subset &b) {
98 kernel::ParticlesTemp rs;
99 std::set_difference(a.begin(), a.end(), b.begin(), b.end(),
100 std::back_inserter(rs));
101 Subset ret(rs,
true);
105 IMPDOMINO_END_NAMESPACE
Store a list of ParticlesTemp.
A nullptr-initialized pointer to an IMP Object.
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
BoundingBoxD< D > get_union(BoundingBoxD< D > a, const BoundingBoxD< D > &b)
Return the union bounding box.
A beyesian infererence-based sampler.
Represent a subset of the particles being optimized.
Import IMP/kernel/macros.h in the namespace.
Subset(kernel::ParticlesTemp ps)
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
Store an array of values of the same type.
BoundingBoxD< D > get_intersection(const BoundingBoxD< D > &a, const BoundingBoxD< D > &b)
Return the intersecting bounding box.
#define IMP_CHECK_OBJECT(obj)
Perform some basic validity checks on the object for memory debugging.
#define IMP_INTERNAL_CHECK(expr, message)
An assertion to check for internal errors in IMP. An IMP::ErrorException will be thrown.
#define IMP_IF_CHECK(level)
Execute the code block if a certain level checks are on.
Class to handle individual model particles.
Class for storing model, its restraints, constraints, and particles.