Barretenberg
The ZK-SNARK library at the core of Aztec
|
A template class for a reference vector. Behaves as if std::vector<T&> was possible. More...
#include <ref_vector.hpp>
Classes | |
class | iterator |
Nested iterator class for RefVector, based on indexing into the pointer vector. Provides semantics similar to what would be expected if std::vector<T&, N> was possible. More... | |
Public Member Functions | |
RefVector ()=default | |
RefVector (const std::vector< T * > &ptr_vector) | |
RefVector (std::vector< T > &vector) | |
template<typename... Ts> | |
RefVector (T &first, Ts &... refs) | |
template<std::size_t N> | |
RefVector (const RefArray< T, N > &ref_array) | |
T & | operator[] (std::size_t idx) const |
std::size_t | size () const |
void | push_back (T &element) |
iterator | begin () const |
iterator | end () const |
template<typename ConvertibleFromT > | |
operator std::vector< ConvertibleFromT > () const | |
std::vector< T * > & | get_storage () |
const std::vector< T * > & | get_storage () const |
Private Attributes | |
std::vector< T * > | storage |
A template class for a reference vector. Behaves as if std::vector<T&> was possible.
This class provides a dynamic-size vector of pointers to elements of type T, exposed as references. It offers random access to its elements and provides an iterator class for traversal.
T | The type of elements stored in the vector. |
Definition at line 23 of file ref_vector.hpp.
|
default |
|
inlineexplicit |
Definition at line 26 of file ref_vector.hpp.
|
inlineexplicit |
Definition at line 30 of file ref_vector.hpp.
|
inline |
Definition at line 39 of file ref_vector.hpp.
|
inline |
Definition at line 44 of file ref_vector.hpp.
|
inline |
Definition at line 101 of file ref_vector.hpp.
|
inline |
Definition at line 102 of file ref_vector.hpp.
|
inline |
Definition at line 113 of file ref_vector.hpp.
|
inline |
Definition at line 114 of file ref_vector.hpp.
|
inline |
Definition at line 104 of file ref_vector.hpp.
|
inline |
Definition at line 52 of file ref_vector.hpp.
|
inline |
Definition at line 100 of file ref_vector.hpp.
|
inline |
Definition at line 98 of file ref_vector.hpp.
|
private |
Definition at line 117 of file ref_vector.hpp.