QuickRank  v2.0
QuickRank: A C++ suite of Learning to Rank algorithms
generate_conditional_operators.h
Go to the documentation of this file.
1 /*
2  * QuickRank - A C++ suite of Learning to Rank algorithms
3  * Webpage: http://quickrank.isti.cnr.it/
4  * Contact: quickrank@isti.cnr.it
5  *
6  * Unless explicitly acquired and licensed from Licensor under another
7  * license, the contents of this file are subject to the Reciprocal Public
8  * License ("RPL") Version 1.5, or subsequent versions as allowed by the RPL,
9  * and You may not copy or use this file in either source code or executable
10  * form, except in compliance with the terms and conditions of the RPL.
11  *
12  * All software distributed under the RPL is provided strictly on an "AS
13  * IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND
14  * LICENSOR HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
15  * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
16  * PURPOSE, QUIET ENJOYMENT, OR NON-INFRINGEMENT. See the RPL for specific
17  * language governing rights and limitations under the RPL.
18  *
19  * Contributor:
20  * HPC. Laboratory - ISTI - CNR - http://hpc.isti.cnr.it/
21  */
22 #pragma once
23 
24 #include <string>
25 #include <memory>
26 #include <fstream>
27 #include <sstream>
28 #include <iomanip>
29 #include <limits>
30 #include <list>
31 #include <iostream>
32 #include <cstring>
33 #include <utils/strutils.h>
34 
35 #include "pugixml/src/pugixml.hpp"
36 
37 namespace quickrank {
38 namespace io {
39 
40 /**
41  * This class is a code generator on QuickRank XML files.
42  *
43  * The XML format is used for loading and storing ranking models.
44  */
45 class GenOpCond {
46  public:
47 
48  GenOpCond() { }
49  ~GenOpCond() { }
50 
51  /// Generates the C++ implementation of the model scoring function.
52  /// This applies to tree forests and generates a cascade of conditional operators.
53  ///
54  /// \param model_filename Previously saved xml ranker model.
55  /// \param code_filename Output source code file name.
56  void
57  generate_conditional_operators_code(const std::string, const std::string);
58 };
59 
60 } // namespace io
61 } // namespace quickrank
GenOpCond()
Definition: generate_conditional_operators.h:48
Definition: dataset.cc:28
void generate_conditional_operators_code(const std::string, const std::string)
Generates the C++ implementation of the model scoring function.
Definition: generate_conditional_operators.cc:75
This class is a code generator on QuickRank XML files.
Definition: generate_conditional_operators.h:45
~GenOpCond()
Definition: generate_conditional_operators.h:49