IMP  2.0.0
The Integrative Modeling Platform
Assignment.h
Go to the documentation of this file.
1 /**
2  * \file IMP/domino/Assignment.h
3  * \brief A beyesian infererence-based sampler.
4  *
5  * Copyright 2007-2013 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPDOMINO_ASSIGNMENT_H
10 #define IMPDOMINO_ASSIGNMENT_H
11 
12 #include <IMP/domino/domino_config.h>
13 #include "domino_macros.h"
14 #include "Subset.h"
16 #include <IMP/base/Value.h>
17 #include <IMP/base/ConstVector.h>
18 #include <IMP/macros.h>
19 
20 
21 IMPDOMINO_BEGIN_NAMESPACE
22 
23 //! Store a configuration of a subset.
24 /** This class stores a configuration of a Subset object. The
25  indices of the corresponding Subset/Assignment objects
26  correspond. That is, the state of the ith particle in
27  a Subset is the ith value in the Assignment.
28 
29  Like Subset objects, Assignment objects cannot be
30  modified and provide a vector/python list like
31  interface.
32 */
33 class IMPDOMINOEXPORT Assignment: public base::ConstVector<int> {
34  typedef base::ConstVector<int> P;
35 public:
36  Assignment(){}
37  Assignment(unsigned int sz): P(sz, -1){}
38  template <class It>
39  Assignment(It b, It e): P(b,e) {
40  }
41  explicit Assignment(const Ints &i): P(i.begin(), i.end()) {
42  }
43 };
44 
46 IMP_SWAP(Assignment);
47 
48 IMPDOMINO_END_NAMESPACE
49 
50 #endif /* IMPDOMINO_ASSIGNMENT_H */