Hypercomplex
Abstract & fast header-only C++ template library for lattice-based cryptosystems in high-dimensional algebras
Loading...
Searching...
No Matches
Classes | Functions
Hypercomplex_MPFR.hpp File Reference
#include "./Hypercomplex.hpp"

Go to the source code of this file.

Classes

class  Hypercomplex< mpfr_t, dim >
 

Functions

uint64_t get_mpfr_precision ()
 Getter for the global precision of the MPFR variables. More...
 
void set_mpfr_precision (uint64_t n)
 Setter for the global precision of the MPFR variables. More...
 
void clear_mpfr_memory ()
 Wrapper for MPFR memory cleanup.
 
template<const uint64_t dim>
bool operator== (const Hypercomplex< mpfr_t, dim > &H1, const Hypercomplex< mpfr_t, dim > &H2)
 Equality operator. More...
 
template<const uint64_t dim>
bool operator!= (const Hypercomplex< mpfr_t, dim > &H1, const Hypercomplex< mpfr_t, dim > &H2)
 Inequality operator. More...
 
template<const uint64_t dim>
Hypercomplex< mpfr_t, dim > operator+ (const Hypercomplex< mpfr_t, dim > &H1, const Hypercomplex< mpfr_t, dim > &H2)
 Addition operator. More...
 
template<const uint64_t dim>
Hypercomplex< mpfr_t, dim > operator- (const Hypercomplex< mpfr_t, dim > &H1, const Hypercomplex< mpfr_t, dim > &H2)
 Subtraction operator. More...
 
template<const uint64_t dim>
Hypercomplex< mpfr_t, dim > operator* (const Hypercomplex< mpfr_t, dim > &H1, const Hypercomplex< mpfr_t, dim > &H2)
 Multiplication operator. More...
 
template<const uint64_t dim>
Hypercomplex< mpfr_t, dim > operator^ (const Hypercomplex< mpfr_t, dim > &H, const uint64_t x)
 Power operator. More...
 
template<const uint64_t dim>
Hypercomplex< mpfr_t, dim > operator/ (const Hypercomplex< mpfr_t, dim > &H1, const Hypercomplex< mpfr_t, dim > &H2)
 Division operator. More...
 
template<const uint64_t dim>
std::ostream & operator<< (std::ostream &os, const Hypercomplex< mpfr_t, dim > &H)
 Print operator. More...
 
template<const uint64_t dim>
Hypercomplex< mpfr_t, dim > Re (const Hypercomplex< mpfr_t, dim > &H)
 Real part of a hypercomplex number. More...
 
template<const uint64_t dim>
Hypercomplex< mpfr_t, dim > Im (const Hypercomplex< mpfr_t, dim > &H)
 Imaginary part of a hypercomplex number. More...
 
template<const uint64_t dim>
Hypercomplex< mpfr_t, dim > exp (const Hypercomplex< mpfr_t, dim > &H)
 Exponentiation operation on a hypercomplex number. More...
 

Function Documentation

◆ exp()

template<const uint64_t dim>
Hypercomplex< mpfr_t, dim > exp ( const Hypercomplex< mpfr_t, dim > &  H)

Exponentiation operation on a hypercomplex number.

Parameters
[in]Hexisting class instance
Returns
new class instance

◆ get_mpfr_precision()

uint64_t get_mpfr_precision ( )

Getter for the global precision of the MPFR variables.

Returns
precision in bits

◆ Im()

template<const uint64_t dim>
Hypercomplex< mpfr_t, dim > Im ( const Hypercomplex< mpfr_t, dim > &  H)

Imaginary part of a hypercomplex number.

Parameters
[in]Hexisting class instance
Returns
new class instance

◆ operator!=()

template<const uint64_t dim>
bool operator!= ( const Hypercomplex< mpfr_t, dim > &  H1,
const Hypercomplex< mpfr_t, dim > &  H2 
)

Inequality operator.

Parameters
[in]H1LHS operand
[in]H2RHS operand
Returns
boolean value after the comparison

◆ operator*()

template<const uint64_t dim>
Hypercomplex< mpfr_t, dim > operator* ( const Hypercomplex< mpfr_t, dim > &  H1,
const Hypercomplex< mpfr_t, dim > &  H2 
)

Multiplication operator.

Parameters
[in]H1LHS operand
[in]H2RHS operand
Returns
new class instance

◆ operator+()

template<const uint64_t dim>
Hypercomplex< mpfr_t, dim > operator+ ( const Hypercomplex< mpfr_t, dim > &  H1,
const Hypercomplex< mpfr_t, dim > &  H2 
)

Addition operator.

Parameters
[in]H1LHS operand
[in]H2RHS operand
Returns
new class instance

◆ operator-()

template<const uint64_t dim>
Hypercomplex< mpfr_t, dim > operator- ( const Hypercomplex< mpfr_t, dim > &  H1,
const Hypercomplex< mpfr_t, dim > &  H2 
)

Subtraction operator.

Parameters
[in]H1LHS operand
[in]H2RHS operand
Returns
new class instance

◆ operator/()

template<const uint64_t dim>
Hypercomplex< mpfr_t, dim > operator/ ( const Hypercomplex< mpfr_t, dim > &  H1,
const Hypercomplex< mpfr_t, dim > &  H2 
)

Division operator.

Parameters
[in]H1LHS operand
[in]H2RHS operand
Returns
new class instance

◆ operator<<()

template<const uint64_t dim>
std::ostream & operator<< ( std::ostream &  os,
const Hypercomplex< mpfr_t, dim > &  H 
)

Print operator.

Parameters
[in,out]osoutput stream
[in]Hexisting class instance
Returns
output stream

◆ operator==()

template<const uint64_t dim>
bool operator== ( const Hypercomplex< mpfr_t, dim > &  H1,
const Hypercomplex< mpfr_t, dim > &  H2 
)

Equality operator.

Parameters
[in]H1LHS operand
[in]H2RHS operand
Returns
boolean value after the comparison

◆ operator^()

template<const uint64_t dim>
Hypercomplex< mpfr_t, dim > operator^ ( const Hypercomplex< mpfr_t, dim > &  H,
const uint64_t  x 
)

Power operator.

Parameters
[in]HLHS operand
[in]xRHS operand
Returns
new class instance

◆ Re()

template<const uint64_t dim>
Hypercomplex< mpfr_t, dim > Re ( const Hypercomplex< mpfr_t, dim > &  H)

Real part of a hypercomplex number.

Parameters
[in]Hexisting class instance
Returns
new class instance

◆ set_mpfr_precision()

void set_mpfr_precision ( uint64_t  n)

Setter for the global precision of the MPFR variables.

Parameters
[in]npositive integer (precision in bits)