OpenMS
ClusterFunctor.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Mathias Walzer $
6 // $Authors: $
7 // --------------------------------------------------------------------------
8 //
9 #pragma once
10 
14 
15 #include <vector>
16 
17 namespace OpenMS
18 {
19 
27  class OPENMS_DLLAPI ClusterFunctor
28  {
29 
30 public:
31 
38  class OPENMS_DLLAPI InsufficientInput :
40  {
41 public:
42  InsufficientInput(const char * file, int line, const char * function, const char * message = "not enough data points to cluster anything") throw();
43  ~InsufficientInput() throw() override;
44  };
45 
46 
49 
51  ClusterFunctor(const ClusterFunctor & source);
52 
54  virtual ~ClusterFunctor();
55 
57  ClusterFunctor & operator=(const ClusterFunctor & source);
58 
71  virtual void operator()(DistanceMatrix<float> & original_distance, std::vector<BinaryTreeNode> & cluster_tree, const float threshold = 1) const = 0;
72 
73 
74 
75  };
76 
77 }
Elements of a binary tree used to represent a hierarchical clustering process.
Definition: BinaryTreeNode.h:23
Exception thrown if not enough data (<2) is used.
Definition: ClusterFunctor.h:40
InsufficientInput(const char *file, int line, const char *function, const char *message="not enough data points to cluster anything")
Base class for cluster functors.
Definition: ClusterFunctor.h:28
A two-dimensional distance matrix, similar to OpenMS::Matrix.
Definition: DistanceMatrix.h:42
Exception base class.
Definition: Exception.h:63
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19