All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CFloatAlgoBase.h
Go to the documentation of this file.
1 /**
2  * \file CFloatAlgoBase.h
3  *
4  * \ingroup CMTool
5  *
6  * \brief Class def header for a class CFloatAlgoBase
7  *
8  * @author kazuhiro
9  */
10 
11 /** \addtogroup CMTool
12 
13  @{*/
14 #ifndef RECOTOOL_CFLOATALGOBASE_H
15 #define RECOTOOL_CFLOATALGOBASE_H
16 
18 namespace util {
19  class GeometryUtilities;
20 }
21 
22 #include <vector>
23 
24 namespace cmtool {
25 
26  /**
27  \class CFloatAlgoBase
28  An abstract base class for mathcing algorithm. Having this base class helps
29  to have a better overall design of various merging for iterative approach.
30  The algorithms are run through CMergeManager.
31  */
32  class CFloatAlgoBase : public CMAlgoBase {
33  public:
34  /**
35  Core function: given the CPAN input, return whether a cluster should be
36  merged or not.
37  */
38  virtual float
40  const std::vector<const cluster::ClusterParamsAlg*>& clusters)
41  {
42  if (clusters.size())
43  return 1;
44  else
45  return -1;
46  }
47  };
48 
49 }
50 
51 #endif
52 /** @} */ // end of doxygen group
virtual float Float(util::GeometryUtilities const &, const std::vector< const cluster::ClusterParamsAlg * > &clusters)
Class def header for a class CMAlgoBase.