Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
libff::bn128_GT Class Reference

#include <bn128_gt.hpp>

Collaboration diagram for libff::bn128_GT:

Public Member Functions

 bn128_GT ()
 
bool operator== (const bn128_GT &other) const
 
bool operator!= (const bn128_GT &other) const
 
bn128_GT operator* (const bn128_GT &other) const
 
bn128_GT unitary_inverse () const
 
void print ()
 

Static Public Member Functions

static bn128_GT one ()
 

Public Attributes

bn::Fp12 elem
 

Static Public Attributes

static bn128_GT GT_one
 

Friends

std::ostream & operator<< (std::ostream &out, const bn128_GT &g)
 
std::istream & operator>> (std::istream &in, bn128_GT &g)
 

Detailed Description

Definition at line 23 of file bn128_gt.hpp.

Constructor & Destructor Documentation

◆ bn128_GT()

libff::bn128_GT::bn128_GT ( )

Definition at line 13 of file bn128_gt.cpp.

14{
15 this->elem.clear();
16}
bn::Fp12 elem
Definition bn128_gt.hpp:26
void clear()
Definition bn.h:1396
Here is the call graph for this function:

Member Function Documentation

◆ one()

bn128_GT libff::bn128_GT::one ( )
static

Definition at line 42 of file bn128_gt.cpp.

43{
44 return GT_one;
45}
static bn128_GT GT_one
Definition bn128_gt.hpp:25

◆ operator!=()

bool libff::bn128_GT::operator!= ( const bn128_GT & other) const

Definition at line 23 of file bn128_gt.cpp.

24{
25 return !(operator==(other));
26}
bool operator==(const bn128_GT &other) const
Definition bn128_gt.cpp:18
Here is the call graph for this function:

◆ operator*()

bn128_GT libff::bn128_GT::operator* ( const bn128_GT & other) const

Definition at line 28 of file bn128_gt.cpp.

29{
30 bn128_GT result;
31 bn::Fp12::mul(result.elem, this->elem, other.elem);
32 return result;
33}
static void(* mul)(Fp12T &z, const Fp12T &x, const Fp12T &y)
Definition bn.h:1449

◆ operator==()

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

Definition at line 18 of file bn128_gt.cpp.

19{
20 return (this->elem == other.elem);
21}
Here is the caller graph for this function:

◆ print()

void libff::bn128_GT::print ( )
inline

Definition at line 37 of file bn128_gt.hpp.

37{ std::cout << this->elem << "\n"; };

◆ unitary_inverse()

bn128_GT libff::bn128_GT::unitary_inverse ( ) const

Definition at line 35 of file bn128_gt.cpp.

36{
37 bn128_GT result(*this);
38 bn::Fp6::neg(result.elem.b_, result.elem.b_);
39 return result;
40}
static void neg(Fp6T &z, const Fp6T &x)
Definition bn.h:896
Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const bn128_GT & g )
friend

Definition at line 47 of file bn128_gt.cpp.

48{
49#ifndef BINARY_OUTPUT
50 out << g.elem.a_ << OUTPUT_SEPARATOR << g.elem.b_;
51#else
52 out.write((char*) &g.elem.a_, sizeof(g.elem.a_));
53 out.write((char*) &g.elem.b_, sizeof(g.elem.b_));
54#endif
55 return out;
56}
#define OUTPUT_SEPARATOR

◆ operator>>

std::istream & operator>> ( std::istream & in,
bn128_GT & g )
friend

Definition at line 58 of file bn128_gt.cpp.

59{
60#ifndef BINARY_OUTPUT
61 in >> g.elem.a_;
63 in >> g.elem.b_;
64#else
65 in.read((char*) &g.elem.a_, sizeof(g.elem.a_));
66 in.read((char*) &g.elem.b_, sizeof(g.elem.b_));
67#endif
68 return in;
69}
void consume_OUTPUT_SEPARATOR(std::istream &in)

Member Data Documentation

◆ elem

bn::Fp12 libff::bn128_GT::elem

Definition at line 26 of file bn128_gt.hpp.

◆ GT_one

bn128_GT libff::bn128_GT::GT_one
static

Definition at line 25 of file bn128_gt.hpp.


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