nil::crypto3::zk::snark::linear_term< FieldType > Struct Template Reference

#include <variable.hpp>

+ Collaboration diagram for nil::crypto3::zk::snark::linear_term< FieldType >:

Public Types

typedef FieldType field_type
 
typedef field_type::value_type field_value_type
 

Public Member Functions

 linear_term ()
 
 linear_term (const variable< field_type > &var)
 
 linear_term (const variable< field_type > &var, const field_value_type &field_coeff)
 
 linear_term (const variable< field_type > &var, const integer_coeff_t int_coeff)
 
linear_term< field_typeoperator* (const field_value_type &field_coeff) const
 
linear_term< field_typeoperator* (const integer_coeff_t int_coeff) const
 
linear_combination< field_typeoperator+ (const linear_combination< field_type > &other) const
 
linear_term< field_typeoperator- () const
 
linear_combination< field_typeoperator- (const linear_combination< field_type > &other) const
 
bool operator== (const linear_term< field_type > &other) const
 

Public Attributes

field_value_type coeff
 
variable< FieldType >::index_type index
 

Detailed Description

template<typename FieldType>
struct nil::crypto3::zk::snark::linear_term< FieldType >

Forward declaration.

A linear term represents a formal expression of the form "coeff * x_{index}".

Member Typedef Documentation

◆ field_type

template<typename FieldType >
typedef FieldType nil::crypto3::zk::snark::linear_term< FieldType >::field_type

◆ field_value_type

template<typename FieldType >
typedef field_type::value_type nil::crypto3::zk::snark::linear_term< FieldType >::field_value_type

Constructor & Destructor Documentation

◆ linear_term() [1/4]

template<typename FieldType >
nil::crypto3::zk::snark::linear_term< FieldType >::linear_term ( )
inline

◆ linear_term() [2/4]

template<typename FieldType >
nil::crypto3::zk::snark::linear_term< FieldType >::linear_term ( const variable< field_type > &  var)
inline

◆ linear_term() [3/4]

template<typename FieldType >
nil::crypto3::zk::snark::linear_term< FieldType >::linear_term ( const variable< field_type > &  var,
const integer_coeff_t  int_coeff 
)
inline

◆ linear_term() [4/4]

template<typename FieldType >
nil::crypto3::zk::snark::linear_term< FieldType >::linear_term ( const variable< field_type > &  var,
const field_value_type field_coeff 
)
inline

Member Function Documentation

◆ operator*() [1/2]

template<typename FieldType >
linear_term<field_type> nil::crypto3::zk::snark::linear_term< FieldType >::operator* ( const field_value_type field_coeff) const
inline

◆ operator*() [2/2]

template<typename FieldType >
linear_term<field_type> nil::crypto3::zk::snark::linear_term< FieldType >::operator* ( const integer_coeff_t  int_coeff) const
inline

◆ operator+()

template<typename FieldType >
linear_combination<field_type> nil::crypto3::zk::snark::linear_term< FieldType >::operator+ ( const linear_combination< field_type > &  other) const
inline

◆ operator-() [1/2]

template<typename FieldType >
linear_term<field_type> nil::crypto3::zk::snark::linear_term< FieldType >::operator- ( ) const
inline

◆ operator-() [2/2]

template<typename FieldType >
linear_combination<field_type> nil::crypto3::zk::snark::linear_term< FieldType >::operator- ( const linear_combination< field_type > &  other) const
inline

◆ operator==()

template<typename FieldType >
bool nil::crypto3::zk::snark::linear_term< FieldType >::operator== ( const linear_term< field_type > &  other) const
inline

Member Data Documentation

◆ coeff

template<typename FieldType >
field_value_type nil::crypto3::zk::snark::linear_term< FieldType >::coeff

◆ index

template<typename FieldType >
variable<FieldType>::index_type nil::crypto3::zk::snark::linear_term< FieldType >::index

The documentation for this struct was generated from the following file: