12 const string& table_filename,
13 const string& query_filename)
18 shared_ptr<genie::table::inv_table> table =
BuildTable(policy, table_data);
19 vector<genie::query::Query> queries =
BuildQuery(policy, table, query_data);
21 return Match(policy, table, queries);
24 shared_ptr<genie::table::inv_table>
genie::BuildTable(shared_ptr<genie::ExecutionPolicy>& policy,
27 return policy->BuildTable(table_data);
30 vector<genie::query::Query>
genie::BuildQuery(shared_ptr<genie::ExecutionPolicy>& policy,
31 const shared_ptr<genie::table::inv_table>& table,
34 return policy->BuildQuery(table, query_data);
38 const shared_ptr<genie::table::inv_table>& table,
39 const vector<genie::query::Query>& queries)
41 return policy->Match(table, queries);
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.
QueryData LoadQueryDataFromCsv(const std::string &filename, const std::shared_ptr< const ExecutionPolicy > &policy)
Reads query from a CSV file and returns in QueryData format.
This is the top-level namespace of the project.
std::vector< std::vector< int > > QueryData
Raw query data format used for building the queries.
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.
TableData LoadTableDataFromCsv(const std::string &filename)
Reads data from a CSV file and returns in TableData format.
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's ID and count).