IMP  2.0.0
The Integrative Modeling Platform
AllBipartitePairContainer.h
Go to the documentation of this file.
1 /**
2  * \file IMP/container/AllBipartitePairContainer.h
3  * \brief Return all pairs from a SingletonContainer
4  *
5  * This file is generated by a script (core/tools/make-container).
6  * Do not edit directly.
7  *
8  * Copyright 2007-2013 IMP Inventors. All rights reserved.
9  */
10 
11 #ifndef IMPCONTAINER_ALL_BIPARTITE_PAIR_CONTAINER_H
12 #define IMPCONTAINER_ALL_BIPARTITE_PAIR_CONTAINER_H
13 
14 #include <IMP/container/container_config.h>
15 
16 #include <IMP/PairContainer.h>
17 #include <IMP/SingletonContainer.h>
20 #include <IMP/pair_macros.h>
21 #include <IMP/singleton_macros.h>
22 
23 IMPCONTAINER_BEGIN_NAMESPACE
24 
25 //! Return all bipartite pairs between two containers
26 /** \see AllPairContainer
27 
28  \usesconstraint
29  */
30 class IMPCONTAINEREXPORT AllBipartitePairContainer : public PairContainer
31 {
33  friend class AllPairContainer;
34 public:
35  template <class F>
36  void apply_generic(F* f) const {
37  validate_readable();
38  ParticleIndexes ib= b_->get_indexes();
40  for (unsigned int j=0; j < ib.size(); ++j) {
41  f->apply_index(get_model(), ParticleIndexPair(_1, ib[j]));
42  }
43  }
44  );
45  }
46  AllBipartitePairContainer(SingletonContainerAdaptor a,
47  SingletonContainerAdaptor b,
48  std::string name="AllBipartitePairContainer%1%");
49 
51 };
52 
54 
55 
56 IMPCONTAINER_END_NAMESPACE
57 
58 #endif /* IMPCONTAINER_ALL_BIPARTITE_PAIR_CONTAINER_H */