Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
Fp2 Class Reference

#include <bn254_if.hpp>

Public Member Functions

 Fp2 ()
 
 Fp2 (const Fp2 &x)
 
 Fp2 (int a)
 
 Fp2 (int a, int b)
 
 Fp2 (const Fp &a, const Fp &b) throw (std::exception)
 
 Fp2 (const std::string &a, const std::string &b) throw (std::exception)
 
FpgetA ()
 
FpgetB ()
 
void set (const std::string &str) throw (std::exception)
 
std::string toString () const throw (std::exception)
 
bool equals (const Fp2 &rhs) const
 
void add (const Fp2 &rhs) throw (std::exception)
 
void sub (const Fp2 &rhs) throw (std::exception)
 
void mul (const Fp2 &rhs) throw (std::exception)
 
void power (const Mpz &x)
 

Friends

class Ec2
 

Detailed Description

Definition at line 87 of file bn254_if.hpp.

Constructor & Destructor Documentation

◆ Fp2() [1/6]

Fp2::Fp2 ( )
inline

Definition at line 91 of file bn254_if.hpp.

91{}

◆ Fp2() [2/6]

Fp2::Fp2 ( const Fp2 & x)
inline

Definition at line 92 of file bn254_if.hpp.

92: self_(x.self_) {}

◆ Fp2() [3/6]

Fp2::Fp2 ( int a)
inline

Definition at line 93 of file bn254_if.hpp.

93: self_(a) {}
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition pointer.h:1181

◆ Fp2() [4/6]

Fp2::Fp2 ( int a,
int b )
inline

Definition at line 94 of file bn254_if.hpp.

94: self_(a, b) {}

◆ Fp2() [5/6]

Fp2::Fp2 ( const Fp & a,
const Fp & b )
throw (std::exception )
inline

Definition at line 95 of file bn254_if.hpp.

96 : self_(a.self_, b.self_)
97 {
98 }

◆ Fp2() [6/6]

Fp2::Fp2 ( const std::string & a,
const std::string & b )
throw (std::exception )
inline

Definition at line 99 of file bn254_if.hpp.

100 : self_(Fp(a).self_, Fp(b).self_)
101 {
102 }

Member Function Documentation

◆ add()

void Fp2::add ( const Fp2 & rhs)
throw (std::exception )
inline

Definition at line 114 of file bn254_if.hpp.

114{ self_ += rhs.self_; }

◆ equals()

bool Fp2::equals ( const Fp2 & rhs) const
inline

Definition at line 113 of file bn254_if.hpp.

113{ return self_ == rhs.self_; }

◆ getA()

Fp & Fp2::getA ( )
inline

Definition at line 103 of file bn254_if.hpp.

103{ return *reinterpret_cast<Fp*>(&self_.a_); }
Fp a_
Definition bn.h:350

◆ getB()

Fp & Fp2::getB ( )
inline

Definition at line 104 of file bn254_if.hpp.

104{ return *reinterpret_cast<Fp*>(&self_.b_); }
Fp b_
Definition bn.h:350

◆ mul()

void Fp2::mul ( const Fp2 & rhs)
throw (std::exception )
inline

Definition at line 116 of file bn254_if.hpp.

116{ self_ *= rhs.self_; }

◆ power()

void Fp2::power ( const Mpz & x)
inline

Definition at line 117 of file bn254_if.hpp.

118 {
119 self_ = mie::power(self_, x.self_);
120 }
T power(const T &x, const S &y)
Definition zm.h:1389
Here is the call graph for this function:

◆ set()

void Fp2::set ( const std::string & str)
throw (std::exception )
inline

Definition at line 105 of file bn254_if.hpp.

106 {
107 self_.set(str);
108 }
void set(const std::string &str)
Definition bn.h:542
Here is the caller graph for this function:

◆ sub()

void Fp2::sub ( const Fp2 & rhs)
throw (std::exception )
inline

Definition at line 115 of file bn254_if.hpp.

115{ self_ -= rhs.self_; }

◆ toString()

std::string Fp2::toString ( ) const
throw (std::exception )
inline

Definition at line 109 of file bn254_if.hpp.

110 {
111 return self_.toString();
112 }
std::string toString(int base=10) const
Definition bn.h:521

Friends And Related Symbol Documentation

◆ Ec2

friend class Ec2
friend

Definition at line 89 of file bn254_if.hpp.


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