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

#include <bn254_if.hpp>

Public Member Functions

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

Friends

class Fp2
 
class Ec1
 

Detailed Description

Definition at line 56 of file bn254_if.hpp.

Constructor & Destructor Documentation

◆ Fp() [1/4]

Fp::Fp ( )
inline

Definition at line 61 of file bn254_if.hpp.

61{}

◆ Fp() [2/4]

Fp::Fp ( const Fp & x)
inline

Definition at line 62 of file bn254_if.hpp.

62: self_(x.self_) {}

◆ Fp() [3/4]

Fp::Fp ( int x)
inline

Definition at line 63 of file bn254_if.hpp.

63: self_(x) {}

◆ Fp() [4/4]

Fp::Fp ( const std::string & str)
throw (std::exception )
inline

Definition at line 64 of file bn254_if.hpp.

65 {
66 self_.set(str);
67 }
void set(int x)
Definition zm2.h:47
Here is the call graph for this function:

Member Function Documentation

◆ add()

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

Definition at line 78 of file bn254_if.hpp.

78{ self_ += rhs.self_; }

◆ equals()

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

Definition at line 77 of file bn254_if.hpp.

77{ return self_ == rhs.self_; }

◆ mul()

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

Definition at line 80 of file bn254_if.hpp.

80{ self_ *= rhs.self_; }

◆ power()

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

Definition at line 81 of file bn254_if.hpp.

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

◆ set() [1/2]

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

Definition at line 69 of file bn254_if.hpp.

70 {
71 self_.set(str);
72 }
Here is the call graph for this function:

◆ set() [2/2]

void Fp::set ( int x)
inline

Definition at line 68 of file bn254_if.hpp.

68{ self_ = x; }
Here is the caller graph for this function:

◆ sub()

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

Definition at line 79 of file bn254_if.hpp.

79{ self_ -= rhs.self_; }

◆ toString()

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

Definition at line 73 of file bn254_if.hpp.

74 {
75 return self_.toString();
76 }
std::string toString(int base=10) const
Definition zm2.h:250
Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ Ec1

friend class Ec1
friend

Definition at line 59 of file bn254_if.hpp.

◆ Fp2

friend class Fp2
friend

Definition at line 58 of file bn254_if.hpp.


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