9 #ifndef IMPDOMINO_SUBSET_H
10 #define IMPDOMINO_SUBSET_H
12 #include <IMP/domino/domino_config.h>
21 IMPDOMINO_BEGIN_NAMESPACE
37 std::sort(ps.begin(), ps.end());
46 for (
unsigned int i = 0; i < size(); ++i) {
49 for (
unsigned int i = 1; i < ps.size(); ++i) {
61 std::sort(ps.begin(), ps.end());
63 "Duplicate particles in set");
64 for (
unsigned int i = 0; i < ps.size(); ++i) {
69 Model *get_model()
const {
return operator[](0)->get_model(); }
70 std::string get_name()
const;
71 bool get_contains(
const Subset &o)
const {
72 return std::includes(begin(), end(), o.begin(), o.end());
81 set_union(a.begin(), a.end(), b.begin(), b.end(), std::back_inserter(pt));
85 inline Subset get_intersection(
const Subset &a,
const Subset &b) {
87 set_intersection(a.begin(), a.end(), b.begin(), b.end(),
88 std::back_inserter(pt));
92 return Subset(pt,
true);
96 inline Subset get_difference(
const Subset &a,
const Subset &b) {
98 std::set_difference(a.begin(), a.end(), b.begin(), b.end(),
99 std::back_inserter(rs));
100 Subset ret(rs,
true);
104 IMPDOMINO_END_NAMESPACE
#define IMP_IF_CHECK(level)
Execute the code block if a certain level checks are on.
Store a list of ParticleIndexes.
A beyesian infererence-based sampler.
#define IMP_CHECK_OBJECT(obj)
Perform some basic validity checks on the object for memory debugging.
Represent a subset of the particles being optimized.
Various general useful macros for IMP.
#define IMP_INTERNAL_CHECK(expr, message)
An assertion to check for internal errors in IMP. An IMP::ErrorException will be thrown.
Class for storing model, its restraints, constraints, and particles.
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
A nullptr-initialized pointer to an IMP Object.
Store an array of values of the same type.
Class to handle individual model particles.
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.