IMP logo
IMP Reference Guide  2.7.0
The Integrative Modeling Platform
Assignment.h
Go to the documentation of this file.
1 /**
2  * \file IMP/domino/Assignment.h
3  * \brief A Bayesian inference-based sampler.
4  *
5  * Copyright 2007-2017 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/Value.h>
17 #include <IMP/ConstVector.h>
18 #include <IMP/macros.h>
19 
20 IMPDOMINO_BEGIN_NAMESPACE
21 
22 //! Store a configuration of a subset.
23 /** This class stores a configuration of a Subset object. The
24  indices of the corresponding Subset/Assignment objects
25  correspond. That is, the state of the ith particle in
26  a Subset is the ith value in the Assignment.
27 
28  Like Subset objects, Assignment objects cannot be
29  modified and provide a vector/Python list like
30  interface.
31 */
32 class IMPDOMINOEXPORT Assignment : public ConstVector<int> {
33  typedef ConstVector<int> P;
34 
35  public:
36  Assignment() {}
37  Assignment(unsigned int sz) : P(sz, -1) {}
38  template <class It>
39  Assignment(It b, It e)
40  : P(b, e) {}
41  explicit Assignment(const Ints &i) : P(i.begin(), i.end()) {}
42 };
43 
45 IMP_SWAP(Assignment);
46 
47 IMPDOMINO_END_NAMESPACE
48 
49 #endif /* IMPDOMINO_ASSIGNMENT_H */
Store a list of ParticleIndexes.
Store an array of values of the same type.
Various general useful macros for IMP.
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
Definition: value_macros.h:23
Various important macros for implementing decorators.
A Bayesian inference-based sampler.
Store a configuration of a subset.
Definition: Assignment.h:32
Basic types used by IMP.
Store an array of values of the same type.
Definition: ConstVector.h:27