Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Types | Public Member Functions | Private Attributes | List of all members
GridBasedCluster Class Reference

basic data structure for clustering More...

#include <OpenMS/COMPARISON/CLUSTERING/GridBasedCluster.h>

Public Types

typedef DPosition< 2 > Point
 
typedef DBoundingBox< 2 > Rectangle
 

Public Member Functions

 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 More...
 
 GridBasedCluster (const Point &centre, const Rectangle &bounding_box, const std::vector< int > &point_indices)
 initialises all data structures More...
 
Point getCentre () const
 returns cluster centre More...
 
Rectangle getBoundingBox () const
 returns bounding box More...
 
std::vector< int > getPoints () const
 returns indices of points in cluster More...
 
int getPropertyA () const
 returns property A More...
 
std::vector< int > getPropertiesB () const
 returns properties B of all points More...
 
bool operator< (GridBasedCluster other) const
 operators for comparisons More...
 
bool operator> (GridBasedCluster other) const
 
bool operator== (GridBasedCluster other) const
 

Private Attributes

Point centre_
 centre of the cluster More...
 
Rectangle bounding_box_
 bounding box of the cluster i.e. (min,max) in x and y direction More...
 
std::vector< int > point_indices_
 set of indices referencing the points in the cluster More...
 
int property_A_
 properties A and B Each point in a cluster can (optionally) possess two properties A and B. For two points to be in the same cluster, they need to have the same property A, e.g. the same charge. For two points to be in the same cluster, they need to have different properties B, e.g. originate from two different maps. -1 means properties are not set. More...
 
std::vector< int > properties_B_
 

Detailed Description

basic data structure for clustering

Member Typedef Documentation

typedef DPosition<2> Point

centre of a cluster

typedef DBoundingBox<2> Rectangle

bounding box of a cluster

Constructor & Destructor Documentation

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

GridBasedCluster ( const Point centre,
const Rectangle bounding_box,
const std::vector< int > &  point_indices 
)

initialises all data structures

Member Function Documentation

Rectangle getBoundingBox ( ) const

returns bounding box

Referenced by GridBasedClustering< Metric >::cluster().

Point getCentre ( ) const
std::vector<int> getPoints ( ) const

returns indices of points in cluster

Referenced by GridBasedClustering< Metric >::cluster().

std::vector<int> getPropertiesB ( ) const

returns properties B of all points

Referenced by GridBasedClustering< Metric >::cluster(), and GridBasedClustering< Metric >::mergeVeto_().

int getPropertyA ( ) const
bool operator< ( GridBasedCluster  other) const

operators for comparisons

bool operator== ( GridBasedCluster  other) const
bool operator> ( GridBasedCluster  other) const

Member Data Documentation

Rectangle bounding_box_
private

bounding box of the cluster i.e. (min,max) in x and y direction

Point centre_
private

centre of the cluster

std::vector<int> point_indices_
private

set of indices referencing the points in the cluster

std::vector<int> properties_B_
private
int property_A_
private

properties A and B Each point in a cluster can (optionally) possess two properties A and B. For two points to be in the same cluster, they need to have the same property A, e.g. the same charge. For two points to be in the same cluster, they need to have different properties B, e.g. originate from two different maps. -1 means properties are not set.


OpenMS / TOPP release 2.0.0 Documentation generated on Thu Aug 20 2015 01:44:35 using doxygen 1.8.9.1