nil::crypto3::zk::components::element_fp3< Fp3T > Struct Template Reference

#include <element_fp3.hpp>

+ Inheritance diagram for nil::crypto3::zk::components::element_fp3< Fp3T >:
+ Collaboration diagram for nil::crypto3::zk::components::element_fp3< Fp3T >:

Public Types

using base_field_type = typename field_type::base_field_type
 
using base_field_value_type = typename base_field_type::value_type
 
using data_type = std::array< underlying_element_type, field_type::arity/underlying_field_type::arity >
 
using field_type = Fp3T
 
using underlying_element_type = element_fp< underlying_field_type >
 
using underlying_field_type = typename field_type::underlying_field_type
 

Public Member Functions

 element_fp3 (blueprint< base_field_type > &bp)
 
 element_fp3 (blueprint< base_field_type > &bp, const typename Fp3T::value_type &el)
 
 element_fp3 (blueprint< base_field_type > &bp, const typename Fp3T::value_type &el, const blueprint_linear_combination< base_field_type > &coeff)
 
 element_fp3 (blueprint< base_field_type > &bp, const underlying_element_type &c0_lc, const underlying_element_type &c1_lc, const underlying_element_type &c2_lc)
 
void evaluate () const
 
void generate_r1cs_equals_const_constraints (const typename Fp3T::value_type &el)
 
void generate_r1cs_witness (const typename Fp3T::value_type &el)
 
Fp3T::value_type get_element ()
 
bool is_constant () const
 
element_fp3< Fp3T > mul_by_X () const
 
element_fp3< Fp3T > operator* (const typename base_field_type::value_type &coeff) const
 
element_fp3< Fp3T > operator+ (const element_fp3< Fp3T > &other) const
 
element_fp3< Fp3T > operator+ (const typename Fp3T::value_type &other) const
 

Static Public Member Functions

static std::size_t num_variables ()
 
static std::size_t size_in_bits ()
 

Public Attributes

blueprint_linear_combination_vector< base_field_typeall_vars
 
data_type data
 

Protected Attributes

blueprint< Fp3T::underlying_field_type > & bp
 

Detailed Description

template<typename Fp3T>
struct nil::crypto3::zk::components::element_fp3< Fp3T >

Component that represents an Fp3 element.

Member Typedef Documentation

◆ base_field_type

template<typename Fp3T >
using nil::crypto3::zk::components::element_fp3< Fp3T >::base_field_type = typename field_type::base_field_type

◆ base_field_value_type

template<typename Fp3T >
using nil::crypto3::zk::components::element_fp3< Fp3T >::base_field_value_type = typename base_field_type::value_type

◆ data_type

template<typename Fp3T >
using nil::crypto3::zk::components::element_fp3< Fp3T >::data_type = std::array<underlying_element_type, field_type::arity / underlying_field_type::arity>

◆ field_type

template<typename Fp3T >
using nil::crypto3::zk::components::element_fp3< Fp3T >::field_type = Fp3T

◆ underlying_element_type

◆ underlying_field_type

template<typename Fp3T >
using nil::crypto3::zk::components::element_fp3< Fp3T >::underlying_field_type = typename field_type::underlying_field_type

Constructor & Destructor Documentation

◆ element_fp3() [1/4]

template<typename Fp3T >
nil::crypto3::zk::components::element_fp3< Fp3T >::element_fp3 ( blueprint< base_field_type > &  bp)
inline

◆ element_fp3() [2/4]

template<typename Fp3T >
nil::crypto3::zk::components::element_fp3< Fp3T >::element_fp3 ( blueprint< base_field_type > &  bp,
const typename Fp3T::value_type &  el 
)
inline

◆ element_fp3() [3/4]

template<typename Fp3T >
nil::crypto3::zk::components::element_fp3< Fp3T >::element_fp3 ( blueprint< base_field_type > &  bp,
const typename Fp3T::value_type &  el,
const blueprint_linear_combination< base_field_type > &  coeff 
)
inline

◆ element_fp3() [4/4]

template<typename Fp3T >
nil::crypto3::zk::components::element_fp3< Fp3T >::element_fp3 ( blueprint< base_field_type > &  bp,
const underlying_element_type c0_lc,
const underlying_element_type c1_lc,
const underlying_element_type c2_lc 
)
inline

Member Function Documentation

◆ evaluate()

template<typename Fp3T >
void nil::crypto3::zk::components::element_fp3< Fp3T >::evaluate ( ) const
inline

◆ generate_r1cs_equals_const_constraints()

template<typename Fp3T >
void nil::crypto3::zk::components::element_fp3< Fp3T >::generate_r1cs_equals_const_constraints ( const typename Fp3T::value_type &  el)
inline

◆ generate_r1cs_witness()

template<typename Fp3T >
void nil::crypto3::zk::components::element_fp3< Fp3T >::generate_r1cs_witness ( const typename Fp3T::value_type &  el)
inline

◆ get_element()

template<typename Fp3T >
Fp3T::value_type nil::crypto3::zk::components::element_fp3< Fp3T >::get_element ( )
inline

◆ is_constant()

template<typename Fp3T >
bool nil::crypto3::zk::components::element_fp3< Fp3T >::is_constant ( ) const
inline

◆ mul_by_X()

template<typename Fp3T >
element_fp3<Fp3T> nil::crypto3::zk::components::element_fp3< Fp3T >::mul_by_X ( ) const
inline

◆ num_variables()

template<typename Fp3T >
static std::size_t nil::crypto3::zk::components::element_fp3< Fp3T >::num_variables ( )
inlinestatic

◆ operator*()

template<typename Fp3T >
element_fp3<Fp3T> nil::crypto3::zk::components::element_fp3< Fp3T >::operator* ( const typename base_field_type::value_type &  coeff) const
inline

◆ operator+() [1/2]

template<typename Fp3T >
element_fp3<Fp3T> nil::crypto3::zk::components::element_fp3< Fp3T >::operator+ ( const element_fp3< Fp3T > &  other) const
inline

◆ operator+() [2/2]

template<typename Fp3T >
element_fp3<Fp3T> nil::crypto3::zk::components::element_fp3< Fp3T >::operator+ ( const typename Fp3T::value_type &  other) const
inline

◆ size_in_bits()

template<typename Fp3T >
static std::size_t nil::crypto3::zk::components::element_fp3< Fp3T >::size_in_bits ( )
inlinestatic

Member Data Documentation

◆ all_vars

◆ bp

blueprint<Fp3T::underlying_field_type >& nil::crypto3::zk::components::component< Fp3T::underlying_field_type >::bp
protectedinherited

◆ data

template<typename Fp3T >
data_type nil::crypto3::zk::components::element_fp3< Fp3T >::data

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