Barretenberg
The ZK-SNARK library at the core of Aztec
|
Selector specialization that only allows zeros. More...
#include <execution_trace_block.hpp>
Public Member Functions | |
void | emplace_back (int value) override |
Append an integer value to the selector. | |
void | push_back (const FF &value) override |
Push a field element to the selector. | |
void | set_back (int value) override |
Set the last value using integer. | |
void | set (size_t idx, int value) override |
Set the value at index using integer. | |
void | set (size_t idx, const FF &value) override |
Set the value at index using a field element. | |
void | resize (size_t new_size) override |
Resize the selector. | |
bool | operator== (const ZeroSelector &other) const |
const FF & | operator[] (size_t index) const override |
Get value at specified index. | |
const FF & | back () const override |
Get the last value in the selector. | |
size_t | size () const override |
Get the number of elements. | |
bool | empty () const override |
Check if the selector is empty. | |
![]() | |
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. | |
Private Attributes | |
size_t | size_ = 0 |
Static Private Attributes | |
static constexpr FF | zero = 0 |
Selector specialization that only allows zeros.
Efficient representation for selectors that are guaranteed to be zero everywhere.
FF | The finite field element type. |
Definition at line 132 of file execution_trace_block.hpp.
|
inlineoverridevirtual |
Get the last value in the selector.
Implements bb::Selector< FF >.
Definition at line 177 of file execution_trace_block.hpp.
|
inlineoverridevirtual |
Append an integer value to the selector.
value | Must be convertible to FF. |
Implements bb::Selector< FF >.
Definition at line 136 of file execution_trace_block.hpp.
|
inlineoverridevirtual |
Check if the selector is empty.
Implements bb::Selector< FF >.
Definition at line 181 of file execution_trace_block.hpp.
|
inline |
Definition at line 169 of file execution_trace_block.hpp.
|
inlineoverridevirtual |
Get value at specified index.
index | Index of the element. |
Implements bb::Selector< FF >.
Definition at line 171 of file execution_trace_block.hpp.
|
inlineoverridevirtual |
Push a field element to the selector.
value | Field element to add. |
Implements bb::Selector< FF >.
Definition at line 142 of file execution_trace_block.hpp.
|
inlineoverridevirtual |
Resize the selector.
new_size | The new size. |
Implements bb::Selector< FF >.
Definition at line 167 of file execution_trace_block.hpp.
|
inlineoverridevirtual |
Set the value at index using a field element.
idx | Index. |
value | Field element. |
Implements bb::Selector< FF >.
Definition at line 160 of file execution_trace_block.hpp.
|
inlineoverridevirtual |
Set the value at index using integer.
idx | Index. |
value | Integer value. |
Implements bb::Selector< FF >.
Definition at line 154 of file execution_trace_block.hpp.
|
inlineoverridevirtual |
Set the last value using integer.
value | Integer value. |
Implements bb::Selector< FF >.
Definition at line 148 of file execution_trace_block.hpp.
|
inlineoverridevirtual |
Get the number of elements.
Implements bb::Selector< FF >.
Definition at line 179 of file execution_trace_block.hpp.
|
private |
Definition at line 185 of file execution_trace_block.hpp.
|
staticconstexprprivate |
Definition at line 184 of file execution_trace_block.hpp.