9 #ifndef IMPDOMINO_SLICE_H
10 #define IMPDOMINO_SLICE_H
12 #include <IMP/domino/domino_config.h>
20 #include <boost/serialization/access.hpp>
21 #include <boost/serialization/vector.hpp>
22 #include <boost/serialization/base_object.hpp>
24 IMPDOMINO_BEGIN_NAMESPACE
33 friend class boost::serialization::access;
35 template<
class Archive>
void serialize(Archive &ar,
const unsigned int) {
36 ar & boost::serialization::base_object<P>(*this);
40 Ints ret(inner.size());
41 for (
unsigned int i = 0; i < inner.size(); ++i) {
42 for (
unsigned int j = 0; j < outer.size(); ++j) {
43 if (inner[i] == outer[j]) {
56 for (
unsigned int i = 0; i < size(); ++i) {
57 ret[i] = a[operator[](i)];
63 for (
unsigned int i = 0; i < size(); ++i) {
64 ret[i] = a[operator[](i)];
77 IMP_USAGE_CHECK(inner.size() <= outer.size(),
"Inner and outer are switched");
78 for (
unsigned int i = 0; i < excluded.size(); ++i) {
83 return Slice(outer, inner);
86 IMPDOMINO_END_NAMESPACE
Store a list of ParticleIndexes.
Store an array of values of the same type.
A Bayesian inference-based sampler.
Represent a subset of the particles being optimized.
Various general useful macros for IMP.
Store a subset of a subset or assignment.
BoundingBoxD< D > get_intersection(const BoundingBoxD< D > &a, const BoundingBoxD< D > &b)
Return the intersecting bounding box.
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
Various important macros for implementing decorators.
A Bayesian inference-based sampler.
Store a configuration of a subset.
Base class for a simple primitive-like type.
Store an array of values of the same type.
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
Slice get_slice(Subset outer, Subset inner, const Subsets &excluded)