9 #ifndef IMPDOMINO_ORDER_H
10 #define IMPDOMINO_ORDER_H
12 #include <IMP/domino/domino_config.h>
21 IMPDOMINO_BEGIN_NAMESPACE
36 Ints get_list_ordered(It b, It e)
const {
37 IMP_USAGE_CHECK(static_cast<unsigned int>(std::distance(b, e)) == size(),
38 "Sizes don't match in permutation");
39 Ints ret(std::distance(b, e));
40 for (
unsigned int i = 0; i < ret.size(); ++i) {
41 ret[operator[](i)] = b[i];
44 "In and out don't match: " <<
Assignment(b, e) <<
" vs "
45 << get_subset_ordered(ret));
49 Assignment get_subset_ordered(It b, It e)
const {
50 IMP_CHECK_VARIABLE(e);
51 IMP_USAGE_CHECK(static_cast<unsigned int>(std::distance(b, e)) == size(),
52 "Sizes don't match in permutation");
54 for (
unsigned int i = 0; i < size(); ++i) {
55 ret.set_item(i, b[
operator[](i)]);
60 return get_list_ordered(a.begin(), a.end());
63 return get_subset_ordered(a.begin(), a.end());
70 IMPDOMINO_END_NAMESPACE
Store a list of ParticleIndexes.
A beyesian infererence-based sampler.
A Bayesian inference-based sampler.
Store a persistent ordering for a subset based on the list.
Represent a subset of the particles being optimized.
Various general useful macros for IMP.
#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.
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.