00001 #ifndef theplu_yat_classifier_knn_reciprocal_rank_h 00002 #define theplu_yat_classifier_knn_reciprocal_rank_h 00003 00004 // $Id: KNN_ReciprocalRank.h 2119 2009-12-12 23:11:43Z peter $ 00005 00006 /* 00007 Copyright (C) 2008 Jari Häkkinen, Peter Johansson, Markus Ringnér 00008 00009 This file is part of the yat library, http://dev.thep.lu.se/yat 00010 00011 The yat library is free software; you can redistribute it and/or 00012 modify it under the terms of the GNU General Public License as 00013 published by the Free Software Foundation; either version 3 of the 00014 License, or (at your option) any later version. 00015 00016 The yat library is distributed in the hope that it will be useful, 00017 but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00019 General Public License for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with yat. If not, see <http://www.gnu.org/licenses/>. 00023 */ 00024 00025 00026 #include <vector> 00027 00028 namespace theplu { 00029 namespace yat { 00030 00031 namespace utility { 00032 class VectorBase; 00033 class VectorMutable; 00034 } 00035 00036 namespace classifier { 00037 00038 class Target; 00039 00040 00051 struct KNN_ReciprocalRank 00052 { 00056 void operator()(const utility::VectorBase& distance, 00057 const std::vector<size_t>& k_sorted, 00058 const Target& target, 00059 utility::VectorMutable& prediction) const; 00060 }; 00061 00062 }}} // of namespace classifier, yat, and theplu 00063 00064 #endif