IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
BoxSweepClosePairsFinder.h
Go to the documentation of this file.
1/**
2 * \file IMP/core/BoxSweepClosePairsFinder.h
3 * \brief Test all pairs of particles to find close pairs.
4 *
5 * Copyright 2007-2022 IMP Inventors. All rights reserved.
6 */
7
8#ifndef IMPCORE_BOX_SWEEP_CLOSE_PAIRS_FINDER_H
9#define IMPCORE_BOX_SWEEP_CLOSE_PAIRS_FINDER_H
10
11#include <IMP/core/core_config.h>
12#include "ClosePairsFinder.h"
13
14IMPCORE_BEGIN_NAMESPACE
15
16#if defined(IMP_DOXYGEN) || defined(IMP_CORE_USE_IMP_CGAL)
17//! Find all nearby pairs by sweeping the bounding boxes
18/** This method is much faster than the quadratic one when
19 there are are large sets of points.
20
21 \requires{class BoxSweepClosePairsFinder, CGAL}
22 \see IMP::container::ClosePairContainer
23*/
24class IMPCOREEXPORT BoxSweepClosePairsFinder : public ClosePairsFinder {
25 public:
26 BoxSweepClosePairsFinder();
27
28 virtual IntPairs get_close_pairs(const algebra::BoundingBox3Ds &bbs) const
29 override;
30 virtual IntPairs get_close_pairs(const algebra::BoundingBox3Ds &bas,
31 const algebra::BoundingBox3Ds &bbs) const
32 override;
34 Model *m, const ParticleIndexes &pc) const override;
36 Model *m, const ParticleIndexes &pca,
37 const ParticleIndexes &pcb) const override;
39 Model *m, const ParticleIndexes &pis) const override;
40 IMP_OBJECT_METHODS(BoxSweepClosePairsFinder);
41};
42#endif /* IMP_USE_CGAL */
43
44IMPCORE_END_NAMESPACE
45
46#endif /* IMPCORE_BOX_SWEEP_CLOSE_PAIRS_FINDER_H */
A base class for algorithms to detect proximities.
Class for storing model, its restraints, constraints, and particles.
Definition Model.h:111
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const override
Overload this method to specify the inputs.
virtual ParticleIndexPairs get_close_pairs(Model *m, const ParticleIndexes &pc) const override
return all close pairs among pc in model m
virtual ParticleIndexPairs get_close_pairs(Model *m, const ParticleIndexes &pca, const ParticleIndexes &pcb) const override
return all close pairs among pc in model m
IMP::Vector< BoundingBox3D > BoundingBox3Ds
IMP::Vector< ParticleIndexPair, std::allocator< ParticleIndexPair > > ParticleIndexPairs
Definition base_types.h:208
IMP::Vector< IntPair > IntPairs
Definition types.h:40
Vector< ParticleIndex, std::allocator< ParticleIndex > > ParticleIndexes
A list of particles, each identified by its ParticleIndex.
Definition base_types.h:199
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
Definition base_types.h:122
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.