/** * \file CloseBipartitePairContainer.h * \brief Return all pairs from a SingletonContainer * * This file is generated by a script (core/tools/make-container). * Do not edit directly. * * Copyright 2007-2010 IMP Inventors. Close rights reserved. */ #ifndef IMPCONTAINER_CLOSE_BIPARTITE_PAIR_CONTAINER_H #define IMPCONTAINER_CLOSE_BIPARTITE_PAIR_CONTAINER_H #include "container_config.h" #include #include #include #include #include #include #include IMPCONTAINER_BEGIN_NAMESPACE /** \brief Return all close unordered pairs of particles taken from the SingletonContainer See ClosePairContainer for a more detailed description. This container lists all close pairs of particles where one particle is taken from each of the input sets. \usesconstraint */ class IMPCONTAINEREXPORT CloseBipartitePairContainer: #if defined(IMP_DOXYGEN) || defined(SWIG) public PairContainer #else public IMP::core::internal::ListLikePairContainer #endif { typedef IMP::core::internal::ListLikePairContainer P; IMP::internal::OwnerPointer a_, b_; IMP::internal::OwnerPointer cpf_; IMP::internal::OwnerPointer moveda_, movedb_; bool first_call_; double distance_, slack_; IMP_ACTIVE_CONTAINER_DECL(CloseBipartitePairContainer); void initialize(SingletonContainer *a, SingletonContainer *b, double distance, double slack, core::ClosePairsFinder *cpf); public: //! Get the individual particles from the passed SingletonContainer CloseBipartitePairContainer(SingletonContainer *a, SingletonContainer *b, double distance, double slack=1); //! Get the individual particles from the passed SingletonContainer CloseBipartitePairContainer(SingletonContainer *a, SingletonContainer *b, double distance, core::ClosePairsFinder *cpf, double slack=1); /** @name Methods to control the set of filters PairContainer objects can be used as filters to prevent the addition of pairs to the containeroutput list. Pairs which are contained in any container added to this list will be excluded from the close pairs list. */ /**@{*/ IMP_LIST(public, PairFilter, pair_filter, PairFilter*, PairFilters); /**@}*/ #ifndef IMP_DOXYGEN #ifndef SWIG bool get_contained_particles_changed() const; ParticlesTemp get_contained_particles() const; #endif bool get_is_up_to_date() const { if (get_model()->get_stage() != Model::NOT_EVALUATING) { return get_last_update_evaluation() == get_model()->get_evaluation(); } else { if (!a_->get_is_up_to_date() || !b_->get_is_up_to_date()) return false; bool ret=true; IMP_FOREACH_SINGLETON(a_, ret= !(imp_foreach_break =_1->get_is_changed());); if (!ret) return ret; IMP_FOREACH_SINGLETON(b_, ret= !(imp_foreach_break =_1->get_is_changed());); return ret;; } } #endif #if defined(IMP_DOXYGEN) || defined(SWIG) IMP_PAIR_CONTAINER(CloseBipartitePairContainer); #else IMP_LISTLIKE_PAIR_CONTAINER(CloseBipartitePairContainer); #endif }; IMP_OBJECTS(CloseBipartitePairContainer,CloseBipartitePairContainers); IMPCONTAINER_END_NAMESPACE #endif /* IMPCONTAINER_CLOSE_BIPARTITE_PAIR_CONTAINER_H */