helib::Database< TXT > Class Template Reference
An object representing a database which is a HElib::Matrix<TXT>.
More...
#include <partialMatch.h>
Public Member Functions | |
| Database (const Matrix< TXT > &M, std::shared_ptr< const Context > c) | |
| Constructor. More... | |
| Database (const Matrix< TXT > &M, const Context &c) | |
| Constructor. More... | |
| template<typename TXT2 > | |
| Matrix< TXT2 > | contains (const Query_t &lookup_query, const Matrix< TXT2 > &query_data) const |
| Function for performing a database lookup given a query expression and query data. More... | |
| template<typename TXT2 > | |
| Matrix< TXT2 > | getScore (const Query_t &weighted_query, const Matrix< TXT2 > &query_data) const |
| Function for performing a weighted partial match given a query expression and query data. More... | |
| long | columns () |
| Returns number of columns in the database. More... | |
Detailed Description
template<typename TXT>
class helib::Database< TXT >
An object representing a database which is a HElib::Matrix<TXT>.
Constructor & Destructor Documentation
◆ Database() [1/2]
template<typename TXT >
|
inline |
Constructor.
- Parameters
-
M The Matrix<TXT>containing the data of the database.c A shared pointer to the context used to create the data.
◆ Database() [2/2]
template<typename TXT >
|
inline |
Constructor.
- Parameters
-
M The Matrix<TXT>containing the data of the database.c The context object used to create the data.
- Note
- This version accepts a
Contextthat this object is not responsible for i.e. if it is on the stack. The programmer is responsible in this case for scope.
Member Function Documentation
◆ columns()
template<typename TXT >
|
inline |
Returns number of columns in the database.
- Returns
- The number of columns in the database.
◆ contains()
template<typename TXT >
template<typename TXT2 >
|
inline |
Function for performing a database lookup given a query expression and query data.
- Parameters
-
lookup_query The lookup query expression to perform. query_data The lookup query data to compare with the database.
- Returns
- A
Matrix<TXT2>containing 1s and 0s in slots where there was a match or no match respectively.
◆ getScore()
template<typename TXT >
template<typename TXT2 >
|
inline |
Function for performing a weighted partial match given a query expression and query data.
- Parameters
-
weighted_query The weighted lookup query expression to perform. query_data The query data to compare with the database.
- Returns
- A
Matrix<TXT2>containing a score on weighted matches.
1.8.19