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

#include <bn128_pairing.hpp>

Public Member Functions

bool operator== (const bn128_ate_G1_precomp &other) const
 

Public Attributes

bn::Fp P [3]
 

Friends

std::ostream & operator<< (std::ostream &out, const bn128_ate_G1_precomp &prec_P)
 
std::istream & operator>> (std::istream &in, bn128_ate_G1_precomp &prec_P)
 

Detailed Description

Definition at line 22 of file bn128_pairing.hpp.

Member Function Documentation

◆ operator==()

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

Definition at line 22 of file bn128_pairing.cpp.

23 {
24  return (
25  this->P[0] == other.P[0] && this->P[1] == other.P[1] &&
26  this->P[2] == other.P[2]);
27 }

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const bn128_ate_G1_precomp prec_P 
)
friend

Definition at line 29 of file bn128_pairing.cpp.

30 {
31  for (size_t i = 0; i < 3; ++i) {
32 #ifndef BINARY_OUTPUT
33  out << prec_P.P[i] << "\n";
34 #else
35  out.write((char *)&prec_P.P[i], sizeof(prec_P.P[i]));
36 #endif
37  }
38  return out;
39 }

◆ operator>>

std::istream& operator>> ( std::istream &  in,
bn128_ate_G1_precomp prec_P 
)
friend

Definition at line 41 of file bn128_pairing.cpp.

42 {
43  for (size_t i = 0; i < 3; ++i) {
44 #ifndef BINARY_OUTPUT
45  in >> prec_P.P[i];
46  consume_newline(in);
47 #else
48  in.read((char *)&prec_P.P[i], sizeof(prec_P.P[i]));
49 #endif
50  }
51  return in;
52 }

Member Data Documentation

◆ P

bn::Fp libff::bn128_ate_G1_precomp::P[3]

Definition at line 23 of file bn128_pairing.hpp.


The documentation for this struct was generated from the following files:
libff::bn128_ate_G1_precomp::P
bn::Fp P[3]
Definition: bn128_pairing.hpp:23
libff::consume_newline
void consume_newline(std::istream &in)