Clearmatics Libsnark
0.1
C++ library for zkSNARK proofs
|
#include <adapters.hpp>
Public Types | |
typedef unsigned long | variable_index_t |
typedef gadgetlib2::Fp | Fp_elem_t |
typedef ::std::pair< variable_index_t, Fp_elem_t > | linear_term_t |
typedef ::std::vector< linear_term_t > | sparse_vec_t |
typedef ::std::pair< sparse_vec_t, Fp_elem_t > | linear_combination_t |
typedef ::std::tuple< linear_combination_t, linear_combination_t, linear_combination_t > | constraint_t |
typedef ::std::vector< constraint_t > | constraint_sys_t |
typedef ::std::map< variable_index_t, Fp_elem_t > | assignment_t |
typedef ::std::pair< constraint_sys_t, assignment_t > | protoboard_t |
Public Member Functions | |
GadgetLibAdapter () | |
linear_term_t | convert (const LinearTerm <) const |
linear_combination_t | convert (const LinearCombination &lc) const |
constraint_t | convert (const Constraint &constraint) const |
constraint_sys_t | convert (const ConstraintSystem &constraint_sys) const |
assignment_t | convert (const VariableAssignment &assignment) const |
protoboard_t | convert (const Protoboard &pb) const |
Fp_elem_t | convert (FElem fElem) const |
Static Public Member Functions | |
static void | resetVariableIndex () |
static size_t | getNextFreeIndex () |
static size_t | getVariableIndex (const Variable &v) |
This class is a temporary hack for quick integration of Fp constraints with ppsnark. It is the IDDQD of classes and has "god mode" friend access to many of the gadgetlib classes. This will be refactored out in the future. –Shaul
Definition at line 37 of file adapters.hpp.
typedef ::std::map<variable_index_t, Fp_elem_t> gadgetlib2::GadgetLibAdapter::assignment_t |
Definition at line 49 of file adapters.hpp.
typedef ::std::vector<constraint_t> gadgetlib2::GadgetLibAdapter::constraint_sys_t |
Definition at line 48 of file adapters.hpp.
typedef ::std:: tuple<linear_combination_t, linear_combination_t, linear_combination_t> gadgetlib2::GadgetLibAdapter::constraint_t |
Definition at line 47 of file adapters.hpp.
Definition at line 41 of file adapters.hpp.
typedef ::std::pair<sparse_vec_t, Fp_elem_t> gadgetlib2::GadgetLibAdapter::linear_combination_t |
Definition at line 44 of file adapters.hpp.
typedef ::std::pair<variable_index_t, Fp_elem_t> gadgetlib2::GadgetLibAdapter::linear_term_t |
Definition at line 42 of file adapters.hpp.
typedef ::std::pair<constraint_sys_t, assignment_t> gadgetlib2::GadgetLibAdapter::protoboard_t |
Definition at line 50 of file adapters.hpp.
typedef ::std::vector<linear_term_t> gadgetlib2::GadgetLibAdapter::sparse_vec_t |
Definition at line 43 of file adapters.hpp.
typedef unsigned long gadgetlib2::GadgetLibAdapter::variable_index_t |
Definition at line 40 of file adapters.hpp.
|
inline |
Definition at line 52 of file adapters.hpp.
GLA::constraint_t gadgetlib2::GLA::convert | ( | const Constraint & | constraint | ) | const |
GLA::constraint_sys_t gadgetlib2::GLA::convert | ( | const ConstraintSystem & | constraint_sys | ) | const |
GLA::linear_combination_t gadgetlib2::GLA::convert | ( | const LinearCombination & | lc | ) | const |
GLA::linear_term_t gadgetlib2::GLA::convert | ( | const LinearTerm & | lt | ) | const |
GLA::protoboard_t gadgetlib2::GLA::convert | ( | const Protoboard & | pb | ) | const |
GLA::assignment_t gadgetlib2::GLA::convert | ( | const VariableAssignment & | assignment | ) | const |
GLA::Fp_elem_t gadgetlib2::GLA::convert | ( | FElem | fElem | ) | const |
|
inlinestatic |
Definition at line 63 of file adapters.hpp.
|
inlinestatic |
Definition at line 66 of file adapters.hpp.
|
static |
Resets variable index to 0 to make variable indices deterministic.
Definition at line 69 of file adapters.cpp.