9 #ifndef IMPDOMINO_ORDER_H
10 #define IMPDOMINO_ORDER_H
12 #include <IMP/domino/domino_config.h>
22 IMPDOMINO_BEGIN_NAMESPACE
36 Ints get_list_ordered(It b, It e)
const {
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];
45 <<
Assignment(b,e) <<
" vs " << get_subset_ordered(ret));
49 Assignment get_subset_ordered(It b, It e)
const {
50 IMP_CHECK_VARIABLE(e);
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