nil::crypto3::zk::snark::uscs_constraint_system< FieldType > Struct Template Reference
#include <uscs.hpp>
Collaboration diagram for nil::crypto3::zk::snark::uscs_constraint_system< FieldType >:
Public Member Functions | |
void | add_constraint (const uscs_constraint< FieldType > &constraint) |
bool | is_satisfied (const uscs_primary_input< FieldType > &primary_input, const uscs_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 uscs_constraint_system< FieldType > &other) const |
uscs_constraint_system () | |
Public Attributes | |
std::size_t | auxiliary_input_size |
std::vector< uscs_constraint< FieldType > > | constraints |
std::size_t | primary_input_size |
Detailed Description
template<typename FieldType>
struct nil::crypto3::zk::snark::uscs_constraint_system< FieldType >
A system of USCS constraints looks like
{ ( \sum_{i=1}^{m_k} a_{k,i} * x_{k,i} )^2 = 1 }_{k=1}^{n} .
In other words, the system is satisfied if and only if there exist a USCS variable assignment for which each USCS constraint evaluates to -1 or 1.
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.
Constructor & Destructor Documentation
◆ uscs_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 |
Member Data Documentation
◆ auxiliary_input_size
template<typename FieldType >
std::size_t nil::crypto3::zk::snark::uscs_constraint_system< FieldType >::auxiliary_input_size |
◆ constraints
template<typename FieldType >
std::vector<uscs_constraint<FieldType> > nil::crypto3::zk::snark::uscs_constraint_system< FieldType >::constraints |
◆ primary_input_size
template<typename FieldType >
std::size_t nil::crypto3::zk::snark::uscs_constraint_system< FieldType >::primary_input_size |
The documentation for this struct was generated from the following file: