OpenMS
Loading...
Searching...
No Matches
GridBasedCluster.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Lars Nilse $
6// $Authors: Lars Nilse $
7// --------------------------------------------------------------------------
8
9#pragma once
10
11#include <vector>
12
16
17namespace OpenMS
18{
22class OPENMS_DLLAPI GridBasedCluster
23{
24 public:
29
34
38 GridBasedCluster(const Point &centre, const Rectangle &bounding_box, const std::vector<int> &point_indices, const int &property_A, const std::vector<int> &properties_B);
39
43 GridBasedCluster(const Point &centre, const Rectangle &bounding_box, const std::vector<int> &point_indices);
44
48 const Point& getCentre() const;
49
53 const Rectangle& getBoundingBox() const;
54
58 const std::vector<int>& getPoints() const;
59
63 int getPropertyA() const;
64
68 const std::vector<int>& getPropertiesB() const;
69
73 bool operator<(const GridBasedCluster& other) const;
74 bool operator>(const GridBasedCluster& other) const;
75 bool operator==(const GridBasedCluster& other) const;
76
77 private:
82
88
92 std::vector<int> point_indices_;
93
103 std::vector<int> properties_B_;
104
105};
106
107}
108
A D-dimensional bounding box.
Definition DBoundingBox.h:30
Representation of a coordinate in D-dimensional space.
Definition DPosition.h:32
basic data structure for clustering
Definition GridBasedCluster.h:23
std::vector< int > point_indices_
set of indices referencing the points in the cluster
Definition GridBasedCluster.h:92
GridBasedCluster(const Point &centre, const Rectangle &bounding_box, const std::vector< int > &point_indices, const int &property_A, const std::vector< int > &properties_B)
initialises all data structures
std::vector< int > properties_B_
Definition GridBasedCluster.h:103
const Rectangle & getBoundingBox() const
returns bounding box
Point centre_
centre of the cluster
Definition GridBasedCluster.h:81
const std::vector< int > & getPoints() const
returns indices of points in cluster
const std::vector< int > & getPropertiesB() const
returns properties B of all points
Rectangle bounding_box_
bounding box of the cluster i.e. (min,max) in x and y direction
Definition GridBasedCluster.h:87
bool operator>(const GridBasedCluster &other) const
int getPropertyA() const
returns property A
int property_A_
properties A and B Each point in a cluster can (optionally) possess two properties A and B....
Definition GridBasedCluster.h:102
bool operator<(const GridBasedCluster &other) const
operators for comparisons
DBoundingBox< 2 > Rectangle
Definition GridBasedCluster.h:33
const Point & getCentre() const
returns cluster centre
bool operator==(const GridBasedCluster &other) const
DPosition< 2 > Point
Definition GridBasedCluster.h:28
GridBasedCluster(const Point &centre, const Rectangle &bounding_box, const std::vector< int > &point_indices)
initialises all data structures
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19