IMP  2.1.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 also AllPairContainer, ClosePairContainer,
27  CloseBipartitePairContainer for variants on the functionality provided.
28  */
29 class IMPCONTAINEREXPORT AllBipartitePairContainer : public PairContainer {
31  int a_version_, b_version_;
32 
33  public:
34  template <class F>
35  void apply_generic(F* f) const {
36  validate_readable();
37  kernel::ParticleIndexes ib = b_->get_indexes();
39  for (unsigned int j = 0; j < ib.size(); ++j) {
40  f->apply_index(get_model(), kernel::ParticleIndexPair(_1, ib[j]));
41  }
42  });
43  }
44  AllBipartitePairContainer(SingletonContainerAdaptor a,
45  SingletonContainerAdaptor b,
46  std::string name = "AllBipartitePairContainer%1%");
47  virtual kernel::ParticleIndexPairs get_indexes() const IMP_OVERRIDE;
48  virtual kernel::ParticleIndexPairs get_range_indexes() const IMP_OVERRIDE;
49  virtual kernel::ModelObjectsTemp do_get_inputs() const IMP_OVERRIDE;
50  virtual kernel::ParticleIndexes get_all_possible_indexes() const IMP_OVERRIDE;
51  virtual void do_before_evaluate() IMP_OVERRIDE;
54 };
55 
57 
58 IMPCONTAINER_END_NAMESPACE
59 
60 #endif /* IMPCONTAINER_ALL_BIPARTITE_PAIR_CONTAINER_H */
virtual ParticleIndexes get_all_possible_indexes() const =0
Get contained particles.
Import IMP/kernel/pair_macros.h in the namespace.
Import IMP/kernel/SingletonContainer.h in the namespace.
A smart pointer to a ref-counted Object that is a class memeber.
Definition: base/Pointer.h:146
Store a set of PairContainers.
#define IMP_PAIR_CONTAINER_METHODS(Name)
Import IMP/kernel/singleton_macros.h in the namespace.
A shared container for Pairs.
virtual ParticleIndexPairs get_indexes() const =0
A class to store an fixed array of same-typed values.
Definition: base/Array.h:33
Import IMP/kernel/PairContainer.h in the namespace.
virtual ParticleIndexPairs get_range_indexes() const =0
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Store a list of ParticlePairsTemp.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
void apply_generic(const PairModifier *m) const
Just use apply() in the base class.
#define IMP_CONTAINER_FOREACH(ContainerType, container, operation)
virtual ModelObjectsTemp do_get_inputs() const =0
A shared container for Singletons.
Return all bipartite pairs between two containers.