nil::crypto3::zk::snark::r1cs_constraint_system< FieldType > Struct Template Reference
#include <r1cs.hpp>
Collaboration diagram for nil::crypto3::zk::snark::r1cs_constraint_system< FieldType >:
Public Types | |
typedef FieldType | field_type |
Public Member Functions | |
void | add_constraint (const r1cs_constraint< FieldType > &c) |
bool | is_satisfied (const r1cs_primary_input< FieldType > &primary_input, const r1cs_auxiliary_input< FieldType > &auxiliary_input) const |
bool | is_valid () const |
std::size_t | num_constraints () const |
std::size_t | num_inputs () const |
std::size_t | num_variables () const |
bool | operator== (const r1cs_constraint_system< FieldType > &other) const |
r1cs_constraint_system () | |
void | swap_AB_if_beneficial () |
Public Attributes | |
std::size_t | auxiliary_input_size |
std::vector< r1cs_constraint< FieldType > > | constraints |
std::size_t | primary_input_size |
Detailed Description
template<typename FieldType>
struct nil::crypto3::zk::snark::r1cs_constraint_system< FieldType >
A system of R1CS constraints looks like
{ < A_k , X > * < B_k , X > = < C_k , X > }_{k=1}^{n} .
In other words, the system is satisfied if and only if there exist a USCS variable assignment for which each R1CS constraint is satisfied.
NOTE: The 0-th variable (i.e., "x_{0}") always represents the constant 1. Thus, the 0-th variable is not included in num_variables.
Member Typedef Documentation
◆ field_type
template<typename FieldType >
typedef FieldType nil::crypto3::zk::snark::r1cs_constraint_system< FieldType >::field_type |
Constructor & Destructor Documentation
◆ r1cs_constraint_system()
template<typename FieldType >
|
inline |
Member Function Documentation
◆ add_constraint()
template<typename FieldType >
|
inline |
◆ is_satisfied()
template<typename FieldType >
|
inline |
◆ is_valid()
template<typename FieldType >
|
inline |
◆ num_constraints()
template<typename FieldType >
|
inline |
◆ num_inputs()
template<typename FieldType >
|
inline |
◆ num_variables()
template<typename FieldType >
|
inline |
◆ operator==()
template<typename FieldType >
|
inline |
◆ swap_AB_if_beneficial()
template<typename FieldType >
|
inline |
Member Data Documentation
◆ auxiliary_input_size
template<typename FieldType >
std::size_t nil::crypto3::zk::snark::r1cs_constraint_system< FieldType >::auxiliary_input_size |
◆ constraints
template<typename FieldType >
std::vector<r1cs_constraint<FieldType> > nil::crypto3::zk::snark::r1cs_constraint_system< FieldType >::constraints |
◆ primary_input_size
template<typename FieldType >
std::size_t nil::crypto3::zk::snark::r1cs_constraint_system< FieldType >::primary_input_size |
The documentation for this struct was generated from the following file: