Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::PairingPointsTagging Class Reference

Class to manage pairing point tagging. More...

#include <pairing_points_tagging.hpp>

Public Member Functions

 PairingPointsTagging ()=default
 
 PairingPointsTagging (const PairingPointsTagging &other)=default
 
 PairingPointsTagging (PairingPointsTagging &&other) noexcept=default
 
PairingPointsTaggingoperator= (const PairingPointsTagging &other)=default
 
PairingPointsTaggingoperator= (PairingPointsTagging &&other) noexcept=default
 
 ~PairingPointsTagging ()=default
 
bool operator== (const PairingPointsTagging &other) const =default
 
uint32_t create_pairing_point_tag ()
 Create a new unique pairing point tag.
 
void merge_pairing_point_tags (uint32_t tag1_index, uint32_t tag2_index)
 Merge two pairing point tags.
 
bool has_single_pairing_point_tag () const
 Check if all pairing point tags belong to a single equivalence class.
 
uint32_t num_unique_pairing_points () const
 Return the number of unique pairing point tags.
 
bool has_pairing_points () const
 Check if any pairing points have been created.
 
bool has_public_pairing_points () const
 Check if pairings points have been set to public.
 
uint32_t get_tag (uint32_t tag_index) const
 Get the tag for a specific pairing point index.
 
void set_public_pairing_points ()
 Record that pairing points have been set to public.
 

Private Attributes

std::vector< uint32_t > pairing_points_tags_
 
uint32_t next_pairing_point_tag_ = 0
 
bool has_pairing_points_ = false
 
bool has_public_pairing_points_ = false
 

Detailed Description

Class to manage pairing point tagging.

This class tracks pairing points and their tags, providing functionality to create new tags, merge tags, and query tag properties. Tags are used to ensure that all the pairing points created in a circuit are aggregated together and set to public (after aggregation).

Definition at line 21 of file pairing_points_tagging.hpp.

Constructor & Destructor Documentation

◆ PairingPointsTagging() [1/3]

bb::PairingPointsTagging::PairingPointsTagging ( )
default

◆ PairingPointsTagging() [2/3]

bb::PairingPointsTagging::PairingPointsTagging ( const PairingPointsTagging other)
default

◆ PairingPointsTagging() [3/3]

bb::PairingPointsTagging::PairingPointsTagging ( PairingPointsTagging &&  other)
defaultnoexcept

◆ ~PairingPointsTagging()

bb::PairingPointsTagging::~PairingPointsTagging ( )
default

Member Function Documentation

◆ create_pairing_point_tag()

uint32_t bb::PairingPointsTagging::create_pairing_point_tag ( )
inline

Create a new unique pairing point tag.

Returns
The new tag value

Definition at line 42 of file pairing_points_tagging.hpp.

◆ get_tag()

uint32_t bb::PairingPointsTagging::get_tag ( uint32_t  tag_index) const
inline

Get the tag for a specific pairing point index.

Definition at line 121 of file pairing_points_tagging.hpp.

◆ has_pairing_points()

bool bb::PairingPointsTagging::has_pairing_points ( ) const
inline

Check if any pairing points have been created.

Returns
true if pairing points have been created

Definition at line 110 of file pairing_points_tagging.hpp.

◆ has_public_pairing_points()

bool bb::PairingPointsTagging::has_public_pairing_points ( ) const
inline

Check if pairings points have been set to public.

Returns
true if pairing points have been set to public

Definition at line 116 of file pairing_points_tagging.hpp.

◆ has_single_pairing_point_tag()

bool bb::PairingPointsTagging::has_single_pairing_point_tag ( ) const
inline

Check if all pairing point tags belong to a single equivalence class.

Returns
true if there's only one equivalence class (or no tags at all)

Definition at line 78 of file pairing_points_tagging.hpp.

◆ merge_pairing_point_tags()

void bb::PairingPointsTagging::merge_pairing_point_tags ( uint32_t  tag1_index,
uint32_t  tag2_index 
)
inline

Merge two pairing point tags.

Parameters
tag1First tag
tag2Second tag

If the tags are different, all instances of tag2 are replaced with tag1. We also check that the pairing points have not been set to public yet.

Definition at line 58 of file pairing_points_tagging.hpp.

◆ num_unique_pairing_points()

uint32_t bb::PairingPointsTagging::num_unique_pairing_points ( ) const
inline

Return the number of unique pairing point tags.

Returns
The count of unique tags

Definition at line 92 of file pairing_points_tagging.hpp.

◆ operator=() [1/2]

PairingPointsTagging & bb::PairingPointsTagging::operator= ( const PairingPointsTagging other)
default

◆ operator=() [2/2]

PairingPointsTagging & bb::PairingPointsTagging::operator= ( PairingPointsTagging &&  other)
defaultnoexcept

◆ operator==()

bool bb::PairingPointsTagging::operator== ( const PairingPointsTagging other) const
default

◆ set_public_pairing_points()

void bb::PairingPointsTagging::set_public_pairing_points ( )
inline

Record that pairing points have been set to public.

Definition at line 126 of file pairing_points_tagging.hpp.

Member Data Documentation

◆ has_pairing_points_

bool bb::PairingPointsTagging::has_pairing_points_ = false
private

Definition at line 25 of file pairing_points_tagging.hpp.

◆ has_public_pairing_points_

bool bb::PairingPointsTagging::has_public_pairing_points_ = false
private

Definition at line 26 of file pairing_points_tagging.hpp.

◆ next_pairing_point_tag_

uint32_t bb::PairingPointsTagging::next_pairing_point_tag_ = 0
private

Definition at line 24 of file pairing_points_tagging.hpp.

◆ pairing_points_tags_

std::vector<uint32_t> bb::PairingPointsTagging::pairing_points_tags_
private

Definition at line 23 of file pairing_points_tagging.hpp.


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