Clearmatics Libsnark
0.1
C++ library for zkSNARK proofs
|
A formal variable, field agnostic. More...
#include <variable.hpp>
Classes | |
struct | VariableStrictOrder |
Public Types | |
typedef ::std::map< Variable, FElem, Variable::VariableStrictOrder > | VariableAssignment |
typedef ::std::set< Variable, VariableStrictOrder > | set |
A set of Variables should be declared as follows: Variable::set s1;. More... | |
typedef ::std::multiset< Variable, VariableStrictOrder > | multiset |
Public Member Functions | |
Variable (const ::std::string &name="") | |
allocates the variable More... | |
virtual | ~Variable () |
::std::string | name () const |
FElem | eval (const VariableAssignment &assignment) const |
Friends | |
class | GadgetLibAdapter |
A formal variable, field agnostic.
Each variable is specified by an index. This can be imagined as the index in x_1, x_2,..., x_i These are formal variables and do not hold an assignment, later the class VariableAssignment will give each formal variable its own assignment. Variables have no comparison and assignment operators as evaluating (x_1 == x_2) has no sense without specific assignments. Variables are field agnostic, this means they can be used regardless of the context field, which will also be determined by the assignment.
Definition at line 306 of file variable.hpp.
typedef ::std::multiset<Variable, VariableStrictOrder> gadgetlib2::Variable::multiset |
Definition at line 342 of file variable.hpp.
typedef ::std::set<Variable, VariableStrictOrder> gadgetlib2::Variable::set |
A set of Variables should be declared as follows: Variable::set s1;.
Definition at line 341 of file variable.hpp.
typedef ::std::map<Variable, FElem, Variable::VariableStrictOrder> gadgetlib2::Variable::VariableAssignment |
Definition at line 337 of file variable.hpp.
|
explicit |
allocates the variable
Definition at line 283 of file variable.cpp.
|
virtual |
Definition at line 295 of file variable.cpp.
FElem gadgetlib2::Variable::eval | ( | const VariableAssignment & | assignment | ) | const |
Definition at line 306 of file variable.cpp.
string gadgetlib2::Variable::name | ( | ) | const |
|
friend |
Definition at line 344 of file variable.hpp.