Barretenberg
The ZK-SNARK library at the core of Aztec
|
Abstract interface for a generic selector. More...
#include <execution_trace_block.hpp>
Public Member Functions | |
Selector ()=default | |
virtual | ~Selector ()=default |
Selector (const Selector &)=default | |
Selector & | operator= (const Selector &)=default |
Selector (Selector &&)=delete | |
Selector & | operator= (Selector &&)=delete |
void | emplace_back (const FF &value) |
Append a field element to the selector. | |
virtual void | emplace_back (int value)=0 |
Append an integer value to the selector. | |
virtual void | push_back (const FF &value)=0 |
Push a field element to the selector. | |
virtual void | resize (size_t new_size)=0 |
Resize the selector. | |
virtual const FF & | operator[] (size_t index) const =0 |
Get value at specified index. | |
virtual const FF & | back () const =0 |
Get the last value in the selector. | |
virtual size_t | size () const =0 |
Get the number of elements. | |
virtual bool | empty () const =0 |
Check if the selector is empty. | |
virtual void | set (size_t idx, int value)=0 |
Set the value at index using integer. | |
virtual void | set_back (int value)=0 |
Set the last value using integer. | |
virtual void | set (size_t idx, const FF &value)=0 |
Set the value at index using a field element. | |
Abstract interface for a generic selector.
A selector holds field elements that represent gate enable signals in circuit constraints. This interface defines basic operations required for concrete selector implementations.
FF | The finite field element type. |
Definition at line 47 of file execution_trace_block.hpp.
|
default |
|
virtualdefault |
|
default |
|
delete |
|
pure virtual |
Get the last value in the selector.
Implemented in bb::ZeroSelector< FF >, bb::ZeroSelector< bb::field >, bb::SlabVectorSelector< FF >, bb::SlabVectorSelector< bb::field >, and bb::SlabVectorSelector< fr >.
|
inline |
Append a field element to the selector.
value | Field element to append. |
Definition at line 62 of file execution_trace_block.hpp.
|
pure virtual |
Append an integer value to the selector.
value | Must be convertible to FF. |
Implemented in bb::SlabVectorSelector< FF >, bb::SlabVectorSelector< bb::field >, bb::SlabVectorSelector< fr >, bb::ZeroSelector< FF >, and bb::ZeroSelector< bb::field >.
|
pure virtual |
Check if the selector is empty.
Implemented in bb::ZeroSelector< FF >, bb::ZeroSelector< bb::field >, bb::SlabVectorSelector< FF >, bb::SlabVectorSelector< bb::field >, and bb::SlabVectorSelector< fr >.
|
pure virtual |
Get value at specified index.
index | Index of the element. |
Implemented in bb::SlabVectorSelector< FF >, bb::SlabVectorSelector< bb::field >, bb::SlabVectorSelector< fr >, bb::ZeroSelector< FF >, and bb::ZeroSelector< bb::field >.
|
pure virtual |
Push a field element to the selector.
value | Field element to add. |
Implemented in bb::ZeroSelector< FF >, bb::SlabVectorSelector< FF >, and bb::SlabVectorSelector< fr >.
|
pure virtual |
Resize the selector.
new_size | The new size. |
Implemented in bb::ZeroSelector< FF >, bb::ZeroSelector< bb::field >, bb::SlabVectorSelector< FF >, bb::SlabVectorSelector< bb::field >, and bb::SlabVectorSelector< fr >.
|
pure virtual |
Set the value at index using a field element.
idx | Index. |
value | Field element. |
Implemented in bb::ZeroSelector< FF >, bb::SlabVectorSelector< FF >, and bb::SlabVectorSelector< fr >.
|
pure virtual |
Set the value at index using integer.
idx | Index. |
value | Integer value. |
Implemented in bb::SlabVectorSelector< FF >, bb::SlabVectorSelector< bb::field >, bb::SlabVectorSelector< fr >, bb::ZeroSelector< FF >, and bb::ZeroSelector< bb::field >.
|
pure virtual |
Set the last value using integer.
value | Integer value. |
Implemented in bb::ZeroSelector< FF >, bb::ZeroSelector< bb::field >, bb::SlabVectorSelector< FF >, bb::SlabVectorSelector< bb::field >, and bb::SlabVectorSelector< fr >.
|
pure virtual |
Get the number of elements.
Implemented in bb::ZeroSelector< FF >, bb::ZeroSelector< bb::field >, bb::SlabVectorSelector< FF >, bb::SlabVectorSelector< bb::field >, and bb::SlabVectorSelector< fr >.