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

#include <bn254_if.hpp>

Public Member Functions

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

Friends

class Fp
 
class Fp2
 
class Fp12
 
class Ec1
 
class Ec2
 

Detailed Description

Definition at line 24 of file bn254_if.hpp.

Constructor & Destructor Documentation

◆ Mpz() [1/4]

Mpz::Mpz ( )
inline

Definition at line 32 of file bn254_if.hpp.

32{}

◆ Mpz() [2/4]

Mpz::Mpz ( const Mpz & x)
inline

Definition at line 33 of file bn254_if.hpp.

33: self_(x.self_) {}

◆ Mpz() [3/4]

Mpz::Mpz ( int x)
throw (std::exception )
inline

Definition at line 34 of file bn254_if.hpp.

34: self_(x) {}

◆ Mpz() [4/4]

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

Definition at line 35 of file bn254_if.hpp.

36 {
37 set(str);
38 }
bool set

Member Function Documentation

◆ add()

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

Definition at line 50 of file bn254_if.hpp.

50{ self_ += rhs.self_; }
Here is the caller graph for this function:

◆ compareTo()

int Mpz::compareTo ( const Mpz & rhs) const
inline

Definition at line 49 of file bn254_if.hpp.

49{ return mpz_cmp(self_.get_mpz_t(), rhs.self_.get_mpz_t()); }

◆ equals()

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

Definition at line 48 of file bn254_if.hpp.

48{ return self_ == rhs.self_; }

◆ mod()

void Mpz::mod ( const Mpz & rhs)
throw (std::exception )
inline

Definition at line 53 of file bn254_if.hpp.

53{ self_ %= rhs.self_; }

◆ mul()

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

Definition at line 52 of file bn254_if.hpp.

52{ self_ *= rhs.self_; }

◆ set() [1/2]

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

Definition at line 40 of file bn254_if.hpp.

41 {
42 self_.set_str(str, 0);
43 }

◆ set() [2/2]

void Mpz::set ( int x)
throw (std::exception )
inline

Definition at line 39 of file bn254_if.hpp.

39{ self_ = x; }

◆ sub()

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

Definition at line 51 of file bn254_if.hpp.

51{ self_ -= rhs.self_; }

◆ toString()

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

Definition at line 44 of file bn254_if.hpp.

45 {
46 return self_.get_str();
47 }

Friends And Related Symbol Documentation

◆ Ec1

friend class Ec1
friend

Definition at line 29 of file bn254_if.hpp.

◆ Ec2

friend class Ec2
friend

Definition at line 30 of file bn254_if.hpp.

◆ Fp

friend class Fp
friend

Definition at line 26 of file bn254_if.hpp.

◆ Fp12

friend class Fp12
friend

Definition at line 28 of file bn254_if.hpp.

◆ Fp2

friend class Fp2
friend

Definition at line 27 of file bn254_if.hpp.


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