9 #ifndef IMPDOMINO_SUBSET_H
10 #define IMPDOMINO_SUBSET_H
12 #include <IMP/domino/domino_config.h>
21 IMPDOMINO_BEGIN_NAMESPACE
39 std::sort(ps.begin(), ps.end());
48 for (
unsigned int i = 0; i < size(); ++i) {
51 for (
unsigned int i = 1; i < ps.size(); ++i) {
63 std::sort(ps.begin(), ps.end());
65 "Duplicate particles in set");
66 for (
unsigned int i = 0; i < ps.size(); ++i) {
71 kernel::Model *get_model()
const {
return operator[](0)->get_model(); }
72 std::string get_name()
const;
73 bool get_contains(
const Subset &o)
const {
74 return std::includes(begin(), end(), o.begin(), o.end());
83 set_union(a.begin(), a.end(), b.begin(), b.end(), std::back_inserter(pt));
87 inline Subset get_intersection(
const Subset &a,
const Subset &b) {
89 set_intersection(a.begin(), a.end(), b.begin(), b.end(),
90 std::back_inserter(pt));
94 return Subset(pt,
true);
98 inline Subset get_difference(
const Subset &a,
const Subset &b) {
99 kernel::ParticlesTemp rs;
100 std::set_difference(a.begin(), a.end(), b.begin(), b.end(),
101 std::back_inserter(rs));
102 Subset ret(rs,
true);
106 IMPDOMINO_END_NAMESPACE
Store a list of kernel::ParticlesTemp.
A nullptr-initialized pointer to an IMP Object.
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
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.
#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.