Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::Relation< RelationImpl > Class Template Reference

A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribution of a given relation to the corresponding accumulator. More...

#include <relation_types.hpp>

Inheritance diagram for bb::Relation< RelationImpl >:
bb::avm2::lookup_relation_base< FF_, Settings_ > bb::avm2::permutation_relation_base< FF_, Settings_ >

Public Types

using FF = typename RelationImpl::FF
 
template<size_t NUM_KEYS>
using ProtogalaxyTupleOfUnivariatesOverSubrelationsNoOptimisticSkipping = TupleOfUnivariates< FF, compute_composed_subrelation_partial_lengths< NUM_KEYS >(SUBRELATION_TOTAL_LENGTHS)>
 
template<size_t NUM_KEYS>
using ProtogalaxyTupleOfUnivariatesOverSubrelations = TupleOfUnivariatesWithOptimisticSkipping< FF, compute_composed_subrelation_partial_lengths< NUM_KEYS >(SUBRELATION_TOTAL_LENGTHS), NUM_KEYS - 1 >
 
using SumcheckTupleOfUnivariatesOverSubrelations = TupleOfUnivariates< FF, RelationImpl::SUBRELATION_PARTIAL_LENGTHS >
 
using SumcheckArrayOfValuesOverSubrelations = ArrayOfValues< FF, RelationImpl::SUBRELATION_PARTIAL_LENGTHS >
 
using UnivariateAccumulator0 = std::tuple_element_t< 0, SumcheckTupleOfUnivariatesOverSubrelations >
 
using ValueAccumulator0 = std::tuple_element_t< 0, SumcheckArrayOfValuesOverSubrelations >
 

Static Public Attributes

static constexpr std::array< size_t, RelationImpl::SUBRELATION_PARTIAL_LENGTHS.size()> SUBRELATION_TOTAL_LENGTHS
 
static constexpr size_t RELATION_LENGTH
 
static constexpr size_t TOTAL_RELATION_LENGTH
 

Detailed Description

template<typename RelationImpl>
class bb::Relation< RelationImpl >

A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribution of a given relation to the corresponding accumulator.

Template Parameters
FF
RelationImplBase class that implements the arithmetic for a given relation (or set of sub-relations)

Definition at line 153 of file relation_types.hpp.

Member Typedef Documentation

◆ FF

template<typename RelationImpl >
using bb::Relation< RelationImpl >::FF = typename RelationImpl::FF

Definition at line 155 of file relation_types.hpp.

◆ ProtogalaxyTupleOfUnivariatesOverSubrelations

template<typename RelationImpl >
template<size_t NUM_KEYS>
using bb::Relation< RelationImpl >::ProtogalaxyTupleOfUnivariatesOverSubrelations = TupleOfUnivariatesWithOptimisticSkipping<FF, compute_composed_subrelation_partial_lengths<NUM_KEYS>( SUBRELATION_TOTAL_LENGTHS), NUM_KEYS - 1>

Definition at line 170 of file relation_types.hpp.

◆ ProtogalaxyTupleOfUnivariatesOverSubrelationsNoOptimisticSkipping

template<typename RelationImpl >
template<size_t NUM_KEYS>
using bb::Relation< RelationImpl >::ProtogalaxyTupleOfUnivariatesOverSubrelationsNoOptimisticSkipping = TupleOfUnivariates<FF, compute_composed_subrelation_partial_lengths<NUM_KEYS>(SUBRELATION_TOTAL_LENGTHS)>

Definition at line 167 of file relation_types.hpp.

◆ SumcheckArrayOfValuesOverSubrelations

template<typename RelationImpl >
using bb::Relation< RelationImpl >::SumcheckArrayOfValuesOverSubrelations = ArrayOfValues<FF, RelationImpl::SUBRELATION_PARTIAL_LENGTHS>

Definition at line 178 of file relation_types.hpp.

◆ SumcheckTupleOfUnivariatesOverSubrelations

template<typename RelationImpl >
using bb::Relation< RelationImpl >::SumcheckTupleOfUnivariatesOverSubrelations = TupleOfUnivariates<FF, RelationImpl::SUBRELATION_PARTIAL_LENGTHS>

Definition at line 175 of file relation_types.hpp.

◆ UnivariateAccumulator0

template<typename RelationImpl >
using bb::Relation< RelationImpl >::UnivariateAccumulator0 = std::tuple_element_t<0, SumcheckTupleOfUnivariatesOverSubrelations>

Definition at line 182 of file relation_types.hpp.

◆ ValueAccumulator0

template<typename RelationImpl >
using bb::Relation< RelationImpl >::ValueAccumulator0 = std::tuple_element_t<0, SumcheckArrayOfValuesOverSubrelations>

Definition at line 183 of file relation_types.hpp.

Member Data Documentation

◆ RELATION_LENGTH

template<typename RelationImpl >
constexpr size_t bb::Relation< RelationImpl >::RELATION_LENGTH
staticconstexpr
Initial value:
= *std::max_element(RelationImpl::SUBRELATION_PARTIAL_LENGTHS.begin(),
RelationImpl::SUBRELATION_PARTIAL_LENGTHS.end())
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13

Definition at line 160 of file relation_types.hpp.

◆ SUBRELATION_TOTAL_LENGTHS

template<typename RelationImpl >
constexpr std::array<size_t, RelationImpl::SUBRELATION_PARTIAL_LENGTHS.size()> bb::Relation< RelationImpl >::SUBRELATION_TOTAL_LENGTHS
staticconstexpr
Initial value:
=
compute_total_subrelation_lengths<RelationImpl>()

Definition at line 157 of file relation_types.hpp.

◆ TOTAL_RELATION_LENGTH

template<typename RelationImpl >
constexpr size_t bb::Relation< RelationImpl >::TOTAL_RELATION_LENGTH
staticconstexpr
Initial value:
=
static constexpr std::array< size_t, RelationImpl::SUBRELATION_PARTIAL_LENGTHS.size()> SUBRELATION_TOTAL_LENGTHS

Definition at line 163 of file relation_types.hpp.


The documentation for this class was generated from the following file: