Barretenberg
The ZK-SNARK library at the core of Aztec
|
A map from 'entry' to 'index' where entry is a row in a BasicTable and index is the row at which that entry exists in the table. More...
#include <types.hpp>
Classes | |
struct | HashFunction |
Public Types | |
using | FF = bb::fr |
using | Key = std::array< FF, 3 > |
using | Value = size_t |
Public Member Functions | |
LookupHashTable ()=default | |
void | initialize (std::vector< FF > &column_1, std::vector< FF > &column_2, std::vector< FF > &column_3) |
Value | operator[] (const Key &key) const |
bool | operator== (const LookupHashTable &other) const =default |
Public Attributes | |
std::unordered_map< Key, Value, HashFunction > | index_map |
A map from 'entry' to 'index' where entry is a row in a BasicTable and index is the row at which that entry exists in the table.
Such a map is needed to in order to construct read_counts (the polynomial containing the number of reads from each entry in a table) for the log-derivative lookup argument. A BasicTable essentially consists of 3 columns, and 'lookups' are recorded as rows in this table. The index at which this data exists in the table is not explicitly known at the time of lookup gate creation. This map can be used to construct read counts from the set of lookups that have been performed via an operation like read_counts[index_map[lookup_data]]++
using bb::plookup::LookupHashTable::Key = std::array<FF, 3> |
using bb::plookup::LookupHashTable::Value = size_t |
|
default |
|
default |
std::unordered_map<Key, Value, HashFunction> bb::plookup::LookupHashTable::index_map |