#ifndef TDensityCluster_seen #define TDensityCluster_seen #include #include #include #include "IHitSelection.hxx" namespace COMET { class IDensityCluster; typedef COMET::IHitSelection Cluster; }; class COMET::IDensityCluster { public: IDensityCluster(unsigned int minPts, double epsilon); virtual ~IDensityCluster() { } void SetMinClusterSize(unsigned int size) { fMinClusterSize = size;} void Cluster(const COMET::IHitSelection&); unsigned int GetClusterCount() { return fClusters.size(); } const COMET::IHitSelection& GetCluster(unsigned int i) { return fClusters.at(i); } unsigned int ls(); protected: COMET::IHitSelection FindSeeds(const COMET::IHitSelection&); COMET::IHitSelection GetNeighbors(COMET::IHandle, const COMET::IHitSelection&); double CalculateDistance(COMET::IHandle, COMET::IHandle); private: unsigned int fMinClusterSize; unsigned int fMinPoints; double fMinDistance; std::vector fClusters; COMET::IHitSelection fRemainingHits; }; #endif