Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
libff::mnt4_ate_G2_precomp Struct Reference

#include <mnt4_pairing.hpp>

Collaboration diagram for libff::mnt4_ate_G2_precomp:

Public Member Functions

bool operator== (const mnt4_ate_G2_precomp &other) const
 

Public Attributes

mnt4_Fq2 QX
 
mnt4_Fq2 QY
 
mnt4_Fq2 QY2
 
mnt4_Fq2 QX_over_twist
 
mnt4_Fq2 QY_over_twist
 
std::vector< mnt4_ate_dbl_coeffsdbl_coeffs
 
std::vector< mnt4_ate_add_coeffsadd_coeffs
 

Friends

std::ostream & operator<< (std::ostream &out, const mnt4_ate_G2_precomp &prec_Q)
 
std::istream & operator>> (std::istream &in, mnt4_ate_G2_precomp &prec_Q)
 

Detailed Description

Definition at line 91 of file mnt4_pairing.hpp.

Member Function Documentation

◆ operator==()

bool libff::mnt4_ate_G2_precomp::operator== ( const mnt4_ate_G2_precomp & other) const

Definition at line 100 of file mnt4_pairing.cpp.

101{
102 return (this->QX == other.QX &&
103 this->QY == other.QY &&
104 this->QY2 == other.QY2 &&
105 this->QX_over_twist == other.QX_over_twist &&
106 this->QY_over_twist == other.QY_over_twist &&
107 this->dbl_coeffs == other.dbl_coeffs &&
108 this->add_coeffs == other.add_coeffs);
109}

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const mnt4_ate_G2_precomp & prec_Q )
friend

Definition at line 111 of file mnt4_pairing.cpp.

112{
113 out << prec_Q.QX << OUTPUT_SEPARATOR
114 << prec_Q.QY << OUTPUT_SEPARATOR
115 << prec_Q.QY2 << OUTPUT_SEPARATOR
116 << prec_Q.QX_over_twist << OUTPUT_SEPARATOR
117 << prec_Q.QY_over_twist << "\n";
118 out << prec_Q.dbl_coeffs.size() << "\n";
119 for (const mnt4_ate_dbl_coeffs &dc : prec_Q.dbl_coeffs)
120 {
121 out << dc << OUTPUT_NEWLINE;
122 }
123 out << prec_Q.add_coeffs.size() << "\n";
124 for (const mnt4_ate_add_coeffs &ac : prec_Q.add_coeffs)
125 {
126 out << ac << OUTPUT_NEWLINE;
127 }
128
129 return out;
130}
#define OUTPUT_NEWLINE
#define OUTPUT_SEPARATOR

◆ operator>>

std::istream & operator>> ( std::istream & in,
mnt4_ate_G2_precomp & prec_Q )
friend

Definition at line 132 of file mnt4_pairing.cpp.

133{
134 in >> prec_Q.QX;
136 in >> prec_Q.QY;
138 in >> prec_Q.QY2;
140 in >> prec_Q.QX_over_twist;
142 in >> prec_Q.QY_over_twist;
143 consume_newline(in);
144
145 prec_Q.dbl_coeffs.clear();
146 size_t dbl_s;
147 in >> dbl_s;
148 consume_newline(in);
149
150 prec_Q.dbl_coeffs.reserve(dbl_s);
151
152 for (size_t i = 0; i < dbl_s; ++i)
153 {
154 mnt4_ate_dbl_coeffs dc;
155 in >> dc;
157 prec_Q.dbl_coeffs.emplace_back(dc);
158 }
159
160 prec_Q.add_coeffs.clear();
161 size_t add_s;
162 in >> add_s;
163 consume_newline(in);
164
165 prec_Q.add_coeffs.reserve(add_s);
166
167 for (size_t i = 0; i < add_s; ++i)
168 {
169 mnt4_ate_add_coeffs ac;
170 in >> ac;
172 prec_Q.add_coeffs.emplace_back(ac);
173 }
174
175 return in;
176}
void consume_OUTPUT_NEWLINE(std::istream &in)
void consume_OUTPUT_SEPARATOR(std::istream &in)
void consume_newline(std::istream &in)

Member Data Documentation

◆ add_coeffs

std::vector<mnt4_ate_add_coeffs> libff::mnt4_ate_G2_precomp::add_coeffs

Definition at line 98 of file mnt4_pairing.hpp.

◆ dbl_coeffs

std::vector<mnt4_ate_dbl_coeffs> libff::mnt4_ate_G2_precomp::dbl_coeffs

Definition at line 97 of file mnt4_pairing.hpp.

◆ QX

mnt4_Fq2 libff::mnt4_ate_G2_precomp::QX

Definition at line 92 of file mnt4_pairing.hpp.

◆ QX_over_twist

mnt4_Fq2 libff::mnt4_ate_G2_precomp::QX_over_twist

Definition at line 95 of file mnt4_pairing.hpp.

◆ QY

mnt4_Fq2 libff::mnt4_ate_G2_precomp::QY

Definition at line 93 of file mnt4_pairing.hpp.

◆ QY2

mnt4_Fq2 libff::mnt4_ate_G2_precomp::QY2

Definition at line 94 of file mnt4_pairing.hpp.

◆ QY_over_twist

mnt4_Fq2 libff::mnt4_ate_G2_precomp::QY_over_twist

Definition at line 96 of file mnt4_pairing.hpp.


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