1 #ifndef GENIE_INTERFACE_EXECUTION_POLICY_H_ 2 #define GENIE_INTERFACE_EXECUTION_POLICY_H_ 30 virtual std::shared_ptr<genie::table::inv_table>
BuildTable(
35 virtual std::vector<genie::query::Query>
BuildQuery(
36 const std::shared_ptr<const genie::table::inv_table>& table,
42 const std::shared_ptr<const genie::table::inv_table>& table,
43 const std::vector<genie::query::Query>& queries) = 0;
48 const std::vector<std::shared_ptr<const genie::table::inv_table> >& tables,
49 const std::vector<std::vector<genie::query::Query> >& queries) = 0;
57 void SetK(
const uint32_t k);
void SetNumOfQueries(const uint32_t num_of_queries)
Sets the number of query.
This is the top-level namespace of the project.
std::vector< std::vector< int > > QueryData
Raw query data format used for building the queries.
virtual void Validate()
Checks whether the given search parameters are in valid range.
virtual std::vector< genie::query::Query > BuildQuery(const std::shared_ptr< const genie::table::inv_table > &table, const genie::QueryData &query_data)=0
Builds the queries with the given query data.
std::vector< std::vector< int > > TableData
Raw table data format used for building the table.
virtual std::shared_ptr< genie::table::inv_table > BuildTable(const genie::TableData &table_data)=0
Builds the inverted index with the given data.
virtual genie::SearchResult Match(const std::shared_ptr< const genie::table::inv_table > &table, const std::vector< genie::query::Query > &queries)=0
Match the given queries on the table.
std::pair< std::vector< int >, std::vector< int > > SearchResult
Matching result (top K's ID and count).
uint32_t GetNumOfQueries() const
Returns the number of query.
Config class holds all user configurable settings of GENIE.
std::shared_ptr< ExecutionPolicy > MakePolicy(const Config &config)
Builds and returns a policy according to the configurations.
void SetK(const uint32_t k)
Sets K.
ExecutionPolicy class is the interface for building table, building query, and matching.