BALL 1.5.0
connectedComponentsProcessor.h
Go to the documentation of this file.
1#ifndef BALL_STRUCTURE_CONNECTEDCOMPONENTSPROCESSOR_H
2#define BALL_STRUCTURE_CONNECTEDCOMPONENTSPROCESSOR_H
3
4#ifndef BALL_CONCEPT_PROCESSOR_H
6#endif
7
8#ifndef BALL_KERNEL_MOLECULE_H
10#endif
11
12#ifndef BOOST_PENDING_DISJOINT_SETS_HPP
13#include <boost/pending/disjoint_sets.hpp>
14#endif
15namespace BALL
16{
32 : public UnaryProcessor<AtomContainer>
33 {
34 public:
38 typedef std::vector<Atom*> Component;
39 typedef std::vector<Molecule> MolVec;
40 typedef std::vector<Component> ComponentVector;
42
44
45
49
52
56
60
62 virtual bool start();
63
66 void clear();
67
70 virtual Processor::Result operator ()(AtomContainer& ac);
71
73 virtual bool finish();
74
76
80
83
98
110
121 void getMinAtomsComponents(MolVec &result, size_t min);
122
130 void getAllComponents(MolVec& results);
132
133 protected:
134 typedef boost::disjoint_sets < int*, int*,
135 boost::find_with_full_path_compression > DisjointSet;
137 };
138}
139
140#endif // BALL_STRUCTURE_CONNECTEDCOMPONENTSPROCESSOR_H
Definition: constants.h:13
T min(const T &a, const T &b)
Definition: MATHS/common.h:102
Computation of the connected components of the molecular graph.
boost::disjoint_sets< int *, int *, boost::find_with_full_path_compression > DisjointSet
virtual bool start()
Processor method which is called before the operator()-call.
void getAllComponents(MolVec &results)
void getComponents(ComponentVector &comp)
Size getNumberOfConnectedComponents()
Returns the number of connected components found.
virtual bool finish()
Processor method which is called after the operator()-call.
ConnectedComponentsProcessor()
Default Constructor.
void getLargestComponent(Molecule &result)
virtual ~ConnectedComponentsProcessor()
Destructor.
void getMinAtomsComponents(MolVec &result, size_t min)
BALL_CREATE(ConnectedComponentsProcessor)
#define BALL_EXPORT
Definition: COMMON/global.h:50