Clearmatics Libff  0.1
C++ library for Finite Fields and Elliptic Curves
Public Member Functions | Public Attributes | Friends | List of all members
libff::alt_bn128_ate_G2_precomp Struct Reference

#include <alt_bn128_pairing.hpp>

Collaboration diagram for libff::alt_bn128_ate_G2_precomp:
Collaboration graph
[legend]

Public Member Functions

bool operator== (const alt_bn128_ate_G2_precomp &other) const
 

Public Attributes

alt_bn128_Fq2 QX
 
alt_bn128_Fq2 QY
 
std::vector< alt_bn128_ate_ell_coeffscoeffs
 

Friends

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

Detailed Description

Definition at line 45 of file alt_bn128_pairing.hpp.

Member Function Documentation

◆ operator==()

bool libff::alt_bn128_ate_G2_precomp::operator== ( const alt_bn128_ate_G2_precomp other) const

Definition at line 67 of file alt_bn128_pairing.cpp.

69 {
70  return (
71  this->QX == other.QX && this->QY == other.QY &&
72  this->coeffs == other.coeffs);
73 }

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 75 of file alt_bn128_pairing.cpp.

77 {
78  out << prec_Q.QX << OUTPUT_SEPARATOR << prec_Q.QY << "\n";
79  out << prec_Q.coeffs.size() << "\n";
80  for (const alt_bn128_ate_ell_coeffs &c : prec_Q.coeffs) {
81  out << c << OUTPUT_NEWLINE;
82  }
83  return out;
84 }

◆ operator>>

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

Definition at line 86 of file alt_bn128_pairing.cpp.

87 {
88  in >> prec_Q.QX;
90  in >> prec_Q.QY;
91  consume_newline(in);
92 
93  prec_Q.coeffs.clear();
94  size_t s;
95  in >> s;
96 
97  consume_newline(in);
98 
99  prec_Q.coeffs.reserve(s);
100 
101  for (size_t i = 0; i < s; ++i) {
102  alt_bn128_ate_ell_coeffs c;
103  in >> c;
105  prec_Q.coeffs.emplace_back(c);
106  }
107 
108  return in;
109 }

Member Data Documentation

◆ coeffs

std::vector<alt_bn128_ate_ell_coeffs> libff::alt_bn128_ate_G2_precomp::coeffs

Definition at line 48 of file alt_bn128_pairing.hpp.

◆ QX

alt_bn128_Fq2 libff::alt_bn128_ate_G2_precomp::QX

Definition at line 46 of file alt_bn128_pairing.hpp.

◆ QY

alt_bn128_Fq2 libff::alt_bn128_ate_G2_precomp::QY

Definition at line 47 of file alt_bn128_pairing.hpp.


The documentation for this struct was generated from the following files:
libff::Fp2_model::coeffs
my_Fp coeffs[2]
Definition: fp2.hpp:63
OUTPUT_SEPARATOR
#define OUTPUT_SEPARATOR
Definition: serialization.hpp:69
libff::alt_bn128_ate_G2_precomp::QX
alt_bn128_Fq2 QX
Definition: alt_bn128_pairing.hpp:46
libff::consume_OUTPUT_SEPARATOR
void consume_OUTPUT_SEPARATOR(std::istream &in)
libff::consume_OUTPUT_NEWLINE
void consume_OUTPUT_NEWLINE(std::istream &in)
OUTPUT_NEWLINE
#define OUTPUT_NEWLINE
Definition: serialization.hpp:68
libff::consume_newline
void consume_newline(std::istream &in)