CBoolAlgoBase.h
Go to the documentation of this file.
1 /**
2  * \file CBoolAlgoBase.h
3  *
4  * \ingroup CMTool
5  *
6  * \brief Class def header for algorithm classes for CMergeManager
7  *
8  * @author kazuhiro
9  */
10 
11 /** \addtogroup CMTool
12 
13  @{*/
14 #ifndef RECOTOOL_CBOOLALGOBASE_H
15 #define RECOTOOL_CBOOLALGOBASE_H
16 
17 #include "CMAlgoBase.h"
18 
19 namespace cmtool {
20 
21  /**
22  \class CBoolAlgoBase
23  An abstract base class for merging algorithm. Having this base class helps
24  to have a better overall design of various merging for iterative approach.
25  The algorithms are run through CMergeManager.
26  */
27  class CBoolAlgoBase : public CMAlgoBase {
28 
29  public:
30 
31  /// Default constructor
33 
34  /// Default destructor
35  virtual ~CBoolAlgoBase(){}
36 
37  /**
38  Core function: given the CPAN input, return whether a cluster should be
39  merged or not.
40  */
41  virtual bool Bool(const ::cluster::ClusterParamsAlg &cluster1,
42  const ::cluster::ClusterParamsAlg &cluster2)
43  { if(cluster1.Plane() != cluster2.Plane()) return false;
44  else return true;
45  }
46 
47  };
48 
49 }
50 
51 #endif
52 /** @} */ // end of doxygen group
53 
virtual ~CBoolAlgoBase()
Default destructor.
Definition: CBoolAlgoBase.h:35
CBoolAlgoBase()
Default constructor.
Definition: CBoolAlgoBase.h:32
Class def header for a class CMAlgoBase.
virtual bool Bool(const ::cluster::ClusterParamsAlg &cluster1, const ::cluster::ClusterParamsAlg &cluster2)
Definition: CBoolAlgoBase.h:41