Chemical Data Processing Library C++ API - Version 1.1.1
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
CDPL::Shape::calcReferenceTverskyComboScore
CDPL_SHAPE_API double calcReferenceTverskyComboScore(const AlignmentResult &res, double alpha=0.95)
CDPL::Shape::AlignedTverskyComboScore
Definition: ScoringFunctors.hpp:262
CDPL::Shape::calcAlignedTverskyComboScore
CDPL_SHAPE_API double calcAlignedTverskyComboScore(const AlignmentResult &res, double beta=0.95)
CDPL::Shape::ShapeTverskyScore
Definition: ScoringFunctors.hpp:99
CDPL::Shape::AlignedColorTverskyScore::operator()
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:252
CDPL::Shape::calcReferenceColorTverskyScore
CDPL_SHAPE_API double calcReferenceColorTverskyScore(const AlignmentResult &res, double alpha=0.95)
CDPL::Shape::calcColorTanimotoScore
CDPL_SHAPE_API double calcColorTanimotoScore(const AlignmentResult &res)
CDPL::Shape::AlignedShapeTverskyScore::AlignedShapeTverskyScore
AlignedShapeTverskyScore(double beta=0.95)
Definition: ScoringFunctors.hpp:233
CDPL::Shape::TotalOverlapTverskyScore::TotalOverlapTverskyScore
TotalOverlapTverskyScore(double alpha=0.95, double beta=0.05)
Definition: ScoringFunctors.hpp:85
CDPL::Shape::TanimotoComboScore::operator()
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:75
CDPL::Shape::ReferenceShapeTverskyScore::ReferenceShapeTverskyScore
ReferenceShapeTverskyScore(double alpha=0.95)
Definition: ScoringFunctors.hpp:169
CDPL::Shape::ReferenceTverskyComboScore::ReferenceTverskyComboScore
ReferenceTverskyComboScore(double alpha=0.95)
Definition: ScoringFunctors.hpp:201
CDPL::Shape::calcTotalOverlapTverskyScore
CDPL_SHAPE_API double calcTotalOverlapTverskyScore(const AlignmentResult &res, double alpha=0.95, double beta=0.05)
CDPL::Shape::ReferenceColorTverskyScore
Definition: ScoringFunctors.hpp:182
CDPL::Shape::TotalOverlapTverskyScore
Definition: ScoringFunctors.hpp:82
CDPL::Shape::ColorTanimotoScore
Definition: ScoringFunctors.hpp:62
CDPL::Shape::ShapeTanimotoScore
Definition: ScoringFunctors.hpp:52
CDPL::Shape::calcAlignedShapeTverskyScore
CDPL_SHAPE_API double calcAlignedShapeTverskyScore(const AlignmentResult &res, double beta=0.95)
CDPL::Shape::TanimotoComboScore
Definition: ScoringFunctors.hpp:72
CDPL::Shape::TotalOverlapTanimotoScore::operator()
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:45
CDPL::Shape::calcReferenceTotalOverlapTverskyScore
CDPL_SHAPE_API double calcReferenceTotalOverlapTverskyScore(const AlignmentResult &res, double alpha=0.95)
CDPL::Shape::calcTotalOverlapTanimotoScore
CDPL_SHAPE_API double calcTotalOverlapTanimotoScore(const AlignmentResult &res)
CDPL::Shape::calcReferenceShapeTverskyScore
CDPL_SHAPE_API double calcReferenceShapeTverskyScore(const AlignmentResult &res, double alpha=0.95)
CDPL::Shape::calcTanimotoComboScore
CDPL_SHAPE_API double calcTanimotoComboScore(const AlignmentResult &res)
CDPL::Shape::ReferenceTotalOverlapTverskyScore::ReferenceTotalOverlapTverskyScore
ReferenceTotalOverlapTverskyScore(double alpha=0.95)
Definition: ScoringFunctors.hpp:153
CDPL::Shape::ColorTverskyScore::operator()
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:122
CDPL::Shape::ColorTverskyScore::ColorTverskyScore
ColorTverskyScore(double alpha=0.95, double beta=0.05)
Definition: ScoringFunctors.hpp:119
CDPL::Shape::calcTverskyComboScore
CDPL_SHAPE_API double calcTverskyComboScore(const AlignmentResult &res, double alpha=0.95, double beta=0.05)
CDPL::Shape::ShapeTverskyScore::ShapeTverskyScore
ShapeTverskyScore(double alpha=0.95, double beta=0.05)
Definition: ScoringFunctors.hpp:102
CDPL::Shape::ReferenceShapeTverskyScore
Definition: ScoringFunctors.hpp:166
CDPL::Shape::ReferenceTverskyComboScore::operator()
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:204
CDPL::Shape::AlignedTotalOverlapTverskyScore::operator()
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:220
CDPL::Shape::TverskyComboScore
Definition: ScoringFunctors.hpp:133
CDPL::Shape::calcAlignedColorTverskyScore
CDPL_SHAPE_API double calcAlignedColorTverskyScore(const AlignmentResult &res, double beta=0.95)
CDPL::Shape::TverskyComboScore::TverskyComboScore
TverskyComboScore(double alpha=0.95, double beta=0.05)
Definition: ScoringFunctors.hpp:136
CDPL::Shape::ReferenceTotalOverlapTverskyScore
Definition: ScoringFunctors.hpp:150
CDPL::Shape::ReferenceTotalOverlapTverskyScore::operator()
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:156
CDPL::Shape::ColorTanimotoScore::operator()
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:65
CDPL::Shape::TverskyComboScore::operator()
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:139
CDPL::Shape::calcColorTverskyScore
CDPL_SHAPE_API double calcColorTverskyScore(const AlignmentResult &res, double alpha=0.95, double beta=0.05)
ScoringFunctions.hpp
Definition of shape alignment scoring functions.
CDPL::Shape::AlignedTotalOverlapTverskyScore::AlignedTotalOverlapTverskyScore
AlignedTotalOverlapTverskyScore(double beta=0.95)
Definition: ScoringFunctors.hpp:217
CDPL::Shape::ReferenceColorTverskyScore::ReferenceColorTverskyScore
ReferenceColorTverskyScore(double alpha=0.95)
Definition: ScoringFunctors.hpp:185
CDPL::Shape::calcAlignedTotalOverlapTverskyScore
CDPL_SHAPE_API double calcAlignedTotalOverlapTverskyScore(const AlignmentResult &res, double beta=0.95)
CDPL::Shape::ShapeTverskyScore::operator()
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:105
CDPL
The namespace of the Chemical Data Processing Library.
CDPL::Shape::TotalOverlapTanimotoScore
Definition: ScoringFunctors.hpp:42
CDPL::Shape::ColorTverskyScore
Definition: ScoringFunctors.hpp:116
CDPL::Shape::calcShapeTanimotoScore
CDPL_SHAPE_API double calcShapeTanimotoScore(const AlignmentResult &res)
CDPL::Shape::AlignmentResult
Definition: AlignmentResult.hpp:45
CDPL::Shape::calcShapeTverskyScore
CDPL_SHAPE_API double calcShapeTverskyScore(const AlignmentResult &res, double alpha=0.95, double beta=0.05)
CDPL::Shape::AlignedShapeTverskyScore
Definition: ScoringFunctors.hpp:230
CDPL::Shape::AlignedShapeTverskyScore::operator()
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:236
CDPL::Shape::AlignedColorTverskyScore
Definition: ScoringFunctors.hpp:246
CDPL::Shape::TotalOverlapTverskyScore::operator()
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:88
CDPL::Shape::ReferenceShapeTverskyScore::operator()
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:172
CDPL::Shape::ShapeTanimotoScore::operator()
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:55
CDPL::Shape::AlignedTverskyComboScore::AlignedTverskyComboScore
AlignedTverskyComboScore(double beta=0.95)
Definition: ScoringFunctors.hpp:265
CDPL::Shape::AlignedTverskyComboScore::operator()
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:268
CDPL::Shape::AlignedColorTverskyScore::AlignedColorTverskyScore
AlignedColorTverskyScore(double beta=0.95)
Definition: ScoringFunctors.hpp:249
CDPL::Shape::ReferenceColorTverskyScore::operator()
double operator()(const AlignmentResult &res) const
Definition: ScoringFunctors.hpp:188
CDPL::Shape::ReferenceTverskyComboScore
Definition: ScoringFunctors.hpp:198
CDPL::Shape::AlignedTotalOverlapTverskyScore
Definition: ScoringFunctors.hpp:214