GENIE
search.h
Go to the documentation of this file.
1 #ifndef GENIE_INTERFACE_SEARCH_H_
2 #define GENIE_INTERFACE_SEARCH_H_
3 
4 #include <string>
5 #include <memory>
6 #include <vector>
7 #include <utility>
9 #include "types.h"
10 
11 namespace genie {
12 
16 SearchResult Search(std::shared_ptr<genie::ExecutionPolicy>& policy,
17  const std::string& table_filename,
18  const std::string& query_filename);
19 
23 std::shared_ptr<genie::table::inv_table> BuildTable(std::shared_ptr<genie::ExecutionPolicy>& policy,
24  const TableData& table_data);
25 
29 std::vector<genie::query::Query> BuildQuery(std::shared_ptr<genie::ExecutionPolicy>& policy,
30  const std::shared_ptr<genie::table::inv_table>& table,
31  const QueryData& query_data);
32 
36 SearchResult Match(std::shared_ptr<genie::ExecutionPolicy>& policy,
37  const std::shared_ptr<genie::table::inv_table>& table,
38  const std::vector<genie::query::Query>& queries);
39 
40 } // end of namespace genie
41 
42 #endif
SearchResult Match(std::shared_ptr< genie::ExecutionPolicy > &policy, const std::shared_ptr< genie::table::inv_table > &table, const std::vector< genie::query::Query > &queries)
2nd-level interface for matching with pre-built table and queries.
This is the top-level namespace of the project.
std::vector< std::vector< int > > QueryData
Raw query data format used for building the queries.
Definition: types.h:16
SearchResult Search(std::shared_ptr< genie::ExecutionPolicy > &policy, const std::string &table_filename, const std::string &query_filename)
1st-level interface for end-to-end matching with given table and query CSV file paths.
std::shared_ptr< genie::table::inv_table > BuildTable(std::shared_ptr< genie::ExecutionPolicy > &policy, const TableData &table_data)
2nd-level interface for building table with TableData.
std::vector< std::vector< int > > TableData
Raw table data format used for building the table.
Definition: types.h:12
std::vector< genie::query::Query > BuildQuery(std::shared_ptr< genie::ExecutionPolicy > &policy, const std::shared_ptr< genie::table::inv_table > &table, const QueryData &query_data)
2nd-level interface for building queries with table and QueryData.
std::pair< std::vector< int >, std::vector< int > > SearchResult
Matching result (top K&#39;s ID and count).
Definition: types.h:20