Generic class representing a bit-array of a specific size.
More...
#include <bits.hpp>
|
| bits () |
|
template<typename... boolList> |
| bits (const boolList &...bits) |
| Construct from initializer-list. More...
|
|
std::vector< bool > | to_vector () const |
|
bool | is_zero () const |
|
template<typename FieldT > |
void | fill_pb_variable_array (libsnark::protoboard< FieldT > &pb, libsnark::pb_variable_array< FieldT > &var_array) const |
|
template<size_t numBits>
class libzeth::bits< numBits >
Generic class representing a bit-array of a specific size.
Definition at line 19 of file bits.hpp.
◆ bits() [1/3]
◆ bits() [2/3]
template<size_t numBits>
template<typename... boolList>
Construct from initializer-list.
◆ bits() [3/3]
template<size_t numBits>
template<typename boolIt >
◆ fill_from_iterator()
template<size_t numBits>
template<typename boolIt >
◆ fill_pb_variable_array()
template<size_t numBits>
template<typename FieldT >
void libzeth::bits< numBits >::fill_pb_variable_array |
( |
libsnark::protoboard< FieldT > & |
pb, |
|
|
libsnark::pb_variable_array< FieldT > & |
var_array |
|
) |
| const |
Fill a libsnark::pb_variable_array with bits from this container, representing each as 1 or 0 in FieldT.
◆ from_hex()
◆ from_size_t()
Create a bits object from a size_t, specifically for bits_addr type. Only available for TreeDepth small enough that TreeDepth bits can be expressed in size_t.
◆ from_vector()
◆ is_zero()
◆ to_vector()
◆ bits_add
template<size_t numBits>
bits bits_add |
( |
const bits< numBits > & |
, |
|
|
const bits< numBits > & |
, |
|
|
bool |
|
|
) |
| |
|
friend |
Sum 2 binary strings with or without carry.
◆ bits_xor
template<size_t numBits>
bits bits_xor |
( |
const bits< numBits > & |
, |
|
|
const bits< numBits > & |
|
|
) |
| |
|
friend |
XOR two binary strings of the same length.
The documentation for this class was generated from the following file:
- /home/runner/work/zeth/zeth/libzeth/core/bits.hpp