CBAlgoShortestDistNonEndPoint.h
Go to the documentation of this file.
1 /**
2  * \file CBAlgoShortestDistNonEndPoint.h
3  *
4  * \ingroup CMTool
5  *
6  * \brief Class def header for a class CBAlgoShortestDistNonEndpoint
7  *
8  * @author davidkaleko
9  */
10 
11 /** \addtogroup CMTool
12 
13  @{*/
14 #ifndef CBALGOSHORTESTDISTNONENDPOINT_H
15 #define CBALGOSHORTESTDISTNONENDPOINT_H
16 
19 
20 namespace cmtool {
21  /**
22  \class CBAlgoShortestDistNonEndpoint
23  User defined class CBAlgoShortestDistNonEndpoint ... these comments are used to generate
24  doxygen documentation!
25  */
27 
28  public:
29 
30  /// Default constructor
32 
33  /// Default destructor
35 
36  /// Overloaded (from CBoolAlgoBase) Bool function
37  virtual bool Bool(const ::cluster::ClusterParamsAlg &cluster1,
38  const ::cluster::ClusterParamsAlg &cluster2);
39 
40 
41  /// Method to set cut value in cm^2 for distance compatibility test
42  void SetSquaredDistanceCut(double d) { _max_2D_dist2 = d; }
43 
44  /// Method to set verbose mode
45  void SetVerbose(bool on) { _verbose = on; }
46 
47  /// Method to set debug mode
48  void SetDebug(bool on) { _debug = on; }
49 
50  /// Set Minimum Number of Hits to consider Cluster
51  void SetMinHits(int n) { _minHits = n; }
52 
53  /**
54  Function to compute a distance between a 2D point (point_x, point_y) to a 2D finite line segment
55  (start_x, start_y) => (end_x, end_y).
56  */
57  double ShortestDistanceSquared(double point_x, double point_y,
58  double start_x, double start_y,
59  double end_x, double end_y ) const;
60 
61 
62 
63  protected:
64 
65  bool _verbose; /// bool to suppress lots of output if you want
66 
67  bool _debug; /// bool to suppress lots of output if you want
68 
69  size_t _minHits; /// Min Number of hits for cluster to be considered
70 
71  double _min_distance_unit; /// minimum distance b/t start and end point of cluster to use it
72 
73  double _max_2D_dist2; /// max distance b/t clusters for comability, in cm^2 (the main param of this algo)
74 
75  };
76 
77 
78 } //end namespace cluster
79 
80 #endif
81 /** @} */ // end of doxygen group
Class def header for algorithm classes for CMergeManager.
double ShortestDistanceSquared(double point_x, double point_y, double start_x, double start_y, double end_x, double end_y) const
virtual ~CBAlgoShortestDistNonEndpoint()
Default destructor.
virtual bool Bool(const ::cluster::ClusterParamsAlg &cluster1, const ::cluster::ClusterParamsAlg &cluster2)
Overloaded (from CBoolAlgoBase) Bool function.
size_t _minHits
bool to suppress lots of output if you want
void SetMinHits(int n)
Set Minimum Number of Hits to consider Cluster.
void SetVerbose(bool on)
Method to set verbose mode.
std::void_t< T > n
double _min_distance_unit
Min Number of hits for cluster to be considered.
void SetSquaredDistanceCut(double d)
Method to set cut value in cm^2 for distance compatibility test.
double _max_2D_dist2
minimum distance b/t start and end point of cluster to use it
bool _debug
bool to suppress lots of output if you want
Definition: cfalgo.cc:3
void SetDebug(bool on)
Method to set debug mode.