Chemical Data Processing Library C++ API - Version 1.2.0
ScoringFunctors.hpp
Go to the documentation of this file.
1 /*
2  * ScoringFunctors.hpp
3  *
4  * This file is part of the Chemical Data Processing Toolkit
5  *
6  * Copyright (C) 2003 Thomas Seidel <thomas.seidel@univie.ac.at>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; see the file COPYING. If not, write to
20  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
29 #ifndef CDPL_SHAPE_SCORINGFUNCTORS_HPP
30 #define CDPL_SHAPE_SCORINGFUNCTORS_HPP
31 
33 
34 
35 namespace CDPL
36 {
37 
38  namespace Shape
39  {
40 
42  {
43 
44  public:
45  double operator()(const AlignmentResult& res) const
46  {
48  }
49  };
50 
52  {
53 
54  public:
55  double operator()(const AlignmentResult& res) const
56  {
57  return calcShapeTanimotoScore(res);
58  }
59  };
60 
62  {
63 
64  public:
65  double operator()(const AlignmentResult& res) const
66  {
67  return calcColorTanimotoScore(res);
68  }
69  };
70 
72  {
73 
74  public:
75  double operator()(const AlignmentResult& res) const
76  {
77  return calcTanimotoComboScore(res);
78  }
79  };
80 
82  {
83 
84  public:
85  TotalOverlapTverskyScore(double alpha = 0.95, double beta = 0.05):
86  alpha(alpha), beta(beta) {}
87 
88  double operator()(const AlignmentResult& res) const
89  {
90  return calcTotalOverlapTverskyScore(res, alpha, beta);
91  }
92 
93  private:
94  double alpha;
95  double beta;
96  };
97 
99  {
100 
101  public:
102  ShapeTverskyScore(double alpha = 0.95, double beta = 0.05):
103  alpha(alpha), beta(beta) {}
104 
105  double operator()(const AlignmentResult& res) const
106  {
107  return calcShapeTverskyScore(res, alpha, beta);
108  }
109 
110  private:
111  double alpha;
112  double beta;
113  };
114 
116  {
117 
118  public:
119  ColorTverskyScore(double alpha = 0.95, double beta = 0.05):
120  alpha(alpha), beta(beta) {}
121 
122  double operator()(const AlignmentResult& res) const
123  {
124  return calcColorTverskyScore(res, alpha, beta);
125  }
126 
127  private:
128  double alpha;
129  double beta;
130  };
131 
133  {
134 
135  public:
136  TverskyComboScore(double alpha = 0.95, double beta = 0.05):
137  alpha(alpha), beta(beta) {}
138 
139  double operator()(const AlignmentResult& res) const
140  {
141  return calcTverskyComboScore(res, alpha, beta);
142  }
143 
144  private:
145  double alpha;
146  double beta;
147  };
148 
150  {
151 
152  public:
153  ReferenceTotalOverlapTverskyScore(double alpha = 0.95):
154  alpha(alpha) {}
155 
156  double operator()(const AlignmentResult& res) const
157  {
158  return calcReferenceTotalOverlapTverskyScore(res, alpha);
159  }
160 
161  private:
162  double alpha;
163  };
164 
166  {
167 
168  public:
169  ReferenceShapeTverskyScore(double alpha = 0.95):
170  alpha(alpha) {}
171 
172  double operator()(const AlignmentResult& res) const
173  {
174  return calcReferenceShapeTverskyScore(res, alpha);
175  }
176 
177  private:
178  double alpha;
179  };
180 
182  {
183 
184  public:
185  ReferenceColorTverskyScore(double alpha = 0.95):
186  alpha(alpha) {}
187 
188  double operator()(const AlignmentResult& res) const
189  {
190  return calcReferenceColorTverskyScore(res, alpha);
191  }
192 
193  private:
194  double alpha;
195  };
196 
198  {
199 
200  public:
201  ReferenceTverskyComboScore(double alpha = 0.95):
202  alpha(alpha) {}
203 
204  double operator()(const AlignmentResult& res) const
205  {
206  return calcReferenceTverskyComboScore(res, alpha);
207  }
208 
209  private:
210  double alpha;
211  };
212 
214  {
215 
216  public:
217  AlignedTotalOverlapTverskyScore(double beta = 0.95):
218  beta(beta) {}
219 
220  double operator()(const AlignmentResult& res) const
221  {
222  return calcAlignedTotalOverlapTverskyScore(res, beta);
223  }
224 
225  private:
226  double beta;
227  };
228 
230  {
231 
232  public:
233  AlignedShapeTverskyScore(double beta = 0.95):
234  beta(beta) {}
235 
236  double operator()(const AlignmentResult& res) const
237  {
238  return calcAlignedShapeTverskyScore(res, beta);
239  }
240 
241  private:
242  double beta;
243  };
244 
246  {
247 
248  public:
249  AlignedColorTverskyScore(double beta = 0.95):
250  beta(beta) {}
251 
252  double operator()(const AlignmentResult& res) const
253  {
254  return calcAlignedColorTverskyScore(res, beta);
255  }
256 
257  private:
258  double beta;
259  };
260 
262  {
263 
264  public:
265  AlignedTverskyComboScore(double beta = 0.95):
266  beta(beta) {}
267 
268  double operator()(const AlignmentResult& res) const
269  {
270  return calcAlignedTverskyComboScore(res, beta);
271  }
272 
273  private:
274  double beta;
275  };
276  } // namespace Shape
277 } // namespace CDPL
278 
279 #endif // CDPL_SHAPE_SCORINGFUNCTORS_HPP
Definition of shape alignment scoring functions.
Definition: ScoringFunctors.hpp:246
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:252
AlignedColorTverskyScore(double beta=0.95)
Definition: ScoringFunctors.hpp:249
Definition: ScoringFunctors.hpp:230
AlignedShapeTverskyScore(double beta=0.95)
Definition: ScoringFunctors.hpp:233
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:236
Definition: ScoringFunctors.hpp:214
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:220
AlignedTotalOverlapTverskyScore(double beta=0.95)
Definition: ScoringFunctors.hpp:217
Definition: ScoringFunctors.hpp:262
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:268
AlignedTverskyComboScore(double beta=0.95)
Definition: ScoringFunctors.hpp:265
Definition: AlignmentResult.hpp:45
Definition: ScoringFunctors.hpp:62
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:65
Definition: ScoringFunctors.hpp:116
ColorTverskyScore(double alpha=0.95, double beta=0.05)
Definition: ScoringFunctors.hpp:119
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:122
Definition: ScoringFunctors.hpp:182
ReferenceColorTverskyScore(double alpha=0.95)
Definition: ScoringFunctors.hpp:185
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:188
Definition: ScoringFunctors.hpp:166
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:172
ReferenceShapeTverskyScore(double alpha=0.95)
Definition: ScoringFunctors.hpp:169
Definition: ScoringFunctors.hpp:150
ReferenceTotalOverlapTverskyScore(double alpha=0.95)
Definition: ScoringFunctors.hpp:153
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:156
Definition: ScoringFunctors.hpp:198
ReferenceTverskyComboScore(double alpha=0.95)
Definition: ScoringFunctors.hpp:201
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:204
Definition: ScoringFunctors.hpp:52
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:55
Definition: ScoringFunctors.hpp:99
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:105
ShapeTverskyScore(double alpha=0.95, double beta=0.05)
Definition: ScoringFunctors.hpp:102
Definition: ScoringFunctors.hpp:72
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:75
Definition: ScoringFunctors.hpp:42
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:45
Definition: ScoringFunctors.hpp:82
TotalOverlapTverskyScore(double alpha=0.95, double beta=0.05)
Definition: ScoringFunctors.hpp:85
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:88
Definition: ScoringFunctors.hpp:133
TverskyComboScore(double alpha=0.95, double beta=0.05)
Definition: ScoringFunctors.hpp:136
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:139
CDPL_SHAPE_API double calcColorTverskyScore(const AlignmentResult &res, double alpha=0.95, double beta=0.05)
CDPL_SHAPE_API double calcShapeTverskyScore(const AlignmentResult &res, double alpha=0.95, double beta=0.05)
CDPL_SHAPE_API double calcReferenceTverskyComboScore(const AlignmentResult &res, double alpha=0.95)
CDPL_SHAPE_API double calcAlignedTverskyComboScore(const AlignmentResult &res, double beta=0.95)
CDPL_SHAPE_API double calcTotalOverlapTverskyScore(const AlignmentResult &res, double alpha=0.95, double beta=0.05)
CDPL_SHAPE_API double calcAlignedShapeTverskyScore(const AlignmentResult &res, double beta=0.95)
CDPL_SHAPE_API double calcShapeTanimotoScore(const AlignmentResult &res)
CDPL_SHAPE_API double calcAlignedTotalOverlapTverskyScore(const AlignmentResult &res, double beta=0.95)
CDPL_SHAPE_API double calcReferenceTotalOverlapTverskyScore(const AlignmentResult &res, double alpha=0.95)
CDPL_SHAPE_API double calcTotalOverlapTanimotoScore(const AlignmentResult &res)
CDPL_SHAPE_API double calcTanimotoComboScore(const AlignmentResult &res)
CDPL_SHAPE_API double calcReferenceColorTverskyScore(const AlignmentResult &res, double alpha=0.95)
CDPL_SHAPE_API double calcColorTanimotoScore(const AlignmentResult &res)
CDPL_SHAPE_API double calcReferenceShapeTverskyScore(const AlignmentResult &res, double alpha=0.95)
CDPL_SHAPE_API double calcAlignedColorTverskyScore(const AlignmentResult &res, double beta=0.95)
CDPL_SHAPE_API double calcTverskyComboScore(const AlignmentResult &res, double alpha=0.95, double beta=0.05)
The namespace of the Chemical Data Processing Library.