Fix smoketest.lua to work with newer lua
[xapian.git] / xapian-letor / ranker.cc
blob4b20519d633198fce9de177c4ee839d40365e39c
1 /* ranker.cc: The abstract ranker file.
3 * Copyright (C) 2012 Parth Gupta
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
18 * USA
21 #include <ranker.h>
23 namespace Xapian {
25 Ranker::Ranker() {
28 /* Override all the four methods below in the ranker sub-classes files
29 * wiz svmranker.cc , listnet.cc, listmle.cc and so on
31 std::list<double>
32 Ranker::rank(const Xapian::RankList & /*rl*/) {
33 std::list<double> res;
35 double d=1.0;
36 res.push_back(d);
37 return res;
40 void
41 Ranker::learn_model() {
44 void
45 Ranker::load_model(const std::string & /*model_file*/) {
49 void
50 Ranker::save_model() {
53 /* This method should read the letor format data and transform into the list of
54 * Xapian::RankList format
56 std::list<Xapian::RankList>
57 Ranker::load_data(const std::string & /*data_file*/) {
58 std::list<Xapian::RankList> res;
60 return res;