|
Clearmatics Libsnark
0.1
C++ library for zkSNARK proofs
|
#include <variable.hpp>
Public Member Functions | |
| FElem (const FElemInterface &elem) | |
| void | promoteToFieldType (FieldType type) |
| FElem () | |
| FElem (const long n) | |
| FElem (const int i) | |
| FElem (const size_t n) | |
| FElem (const Fp &elem) | |
| FElem (const FElem &src) | |
| FElem & | operator= (const FElem &other) |
| FElem & | operator= (FElem &&other) |
| FElem & | operator= (const long i) |
| ::std::string | asString () const |
| FieldType | fieldType () const |
| bool | operator== (const FElem &other) const |
| FElem & | operator*= (const FElem &other) |
| FElem & | operator+= (const FElem &other) |
| FElem & | operator-= (const FElem &other) |
| FElem | operator- () const |
| FElem | inverse (const FieldType &fieldType) |
| long | asLong () const |
| int | getBit (unsigned int i, const FieldType &fieldType) |
Friends | |
| class | GadgetLibAdapter |
| FElem | power (const FElem &base, long exponent) |
| ::std::ostream & | operator<< (::std::ostream &os, const FElem &elem) |
A wrapper class for field elements. Can hold any derived type of FieldElementInterface
Definition at line 101 of file variable.hpp.
|
explicit |
Definition at line 43 of file variable.cpp.
| gadgetlib2::FElem::FElem | ( | ) |
| gadgetlib2::FElem::FElem | ( | const long | n | ) |
Definition at line 45 of file variable.cpp.
| gadgetlib2::FElem::FElem | ( | const int | i | ) |
Definition at line 46 of file variable.cpp.
| gadgetlib2::FElem::FElem | ( | const size_t | n | ) |
Definition at line 47 of file variable.cpp.
| gadgetlib2::FElem::FElem | ( | const Fp & | elem | ) |
Definition at line 48 of file variable.cpp.
| gadgetlib2::FElem::FElem | ( | const FElem & | src | ) |
Definition at line 49 of file variable.cpp.
|
inline |
|
inline |
|
inline |
| int gadgetlib2::FElem::getBit | ( | unsigned int | i, |
| const FieldType & | fieldType | ||
| ) |
Definition at line 122 of file variable.cpp.


|
inline |
|
inline |
Definition at line 122 of file variable.hpp.
|
inline |
Definition at line 129 of file variable.hpp.
| void gadgetlib2::FElem::promoteToFieldType | ( | FieldType | type | ) |
Helper method. When doing arithmetic between a constant and a field specific element we want to "promote" the constant to the same field. This function changes the unique_ptr to point to a field specific element with the same value as the constant which it held.
Definition at line 86 of file variable.cpp.


|
friend |
Definition at line 150 of file variable.hpp.
|
friend |
Definition at line 144 of file variable.hpp.
Definition at line 139 of file variable.cpp.
1.8.17