All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
seaDBSCAN.h
Go to the documentation of this file.
1 /**
2  * \file seaDBSCAN.h
3  *
4  *
5  * \brief Class def header for a class seaDBSCAN
6  *
7  * @author mark ross-lonergan markrl@nevis.columbia.edu
8  * Written 20th May 2019.
9  */
10 
11 #ifndef SBNCODE_SINGLEPHOTONANALYSIS_seaDBSCAN_H
12 #define SBNCODE_SINGLEPHOTONANALYSIS_seaDBSCAN_H
13 
14 #include <iostream>
15 #include <algorithm>
16 #include <cmath>
17 #include <vector>
18 #include <climits>
19 #include <limits>
20 
21 
22 namespace seaview{
23 class seaDBSCAN{
24 
25  public:
26  double m_eps;
27  int m_minpts;
28 
29  /// constructor
30  seaDBSCAN(double in_eps, int in_minpts): m_eps(in_eps), m_minpts(in_minpts) {}
31 
32  /// Default destructor
34 
35  // identify each hit to a certain cluster, or identify as noise
36  std::vector<int> Scan2D(std::vector<std::vector<double>> &pts);
37  // get neighbour points for point i from vector pts
38  std::vector<std::vector<double>> GetNeighbours(size_t i, std::vector<std::vector<double>> &pts,bool);
39  // combine elements in pts to seed if not found in seed
40  int UnionSets(std::vector<std::vector<double>> &seed, std::vector<std::vector<double>> &pts);
41  // calculate distance between (w1, t1) and (w2, t2)
42  double SimpleDist(double w1, double t1, double w2, double t2);
43 
44 };
45 
46 }
47 
48 #endif // SBNCODE_SINGLEPHOTONANALYSIS_seaDBSCAN_H
~seaDBSCAN()
Default destructor.
Definition: seaDBSCAN.h:33
std::vector< std::vector< double > > GetNeighbours(size_t i, std::vector< std::vector< double >> &pts, bool)
Definition: seaDBSCAN.cxx:58
int UnionSets(std::vector< std::vector< double >> &seed, std::vector< std::vector< double >> &pts)
Definition: seaDBSCAN.cxx:86
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
unsigned int seed
std::vector< int > Scan2D(std::vector< std::vector< double >> &pts)
Definition: seaDBSCAN.cxx:5
seaDBSCAN(double in_eps, int in_minpts)
constructor
Definition: seaDBSCAN.h:30
double SimpleDist(double w1, double t1, double w2, double t2)
Definition: seaDBSCAN.cxx:110