9 #ifndef IMPDOMINO_SLICE_H
10 #define IMPDOMINO_SLICE_H
12 #include <IMP/domino/domino_config.h>
20 #include <cereal/access.hpp>
21 #include <cereal/types/vector.hpp>
22 #include <cereal/types/base_class.hpp>
24 IMPDOMINO_BEGIN_NAMESPACE
33 friend class cereal::access;
35 template<
class Archive>
void serialize(Archive &ar) {
36 ar(cereal::base_class<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)