|
void | ident (Mat_64 &mat, long dim) |
| Transforms mat into the identity matrix of dimensions \(\text{dim}\times\text{dim}\). More...
|
|
template<typename T > |
void | transpose (NTL::Mat< T > &X, const NTL::Mat< T > &A) |
| Transposes A into X . More...
|
|
template<typename T > |
NTL::Mat< T > | transpose (const NTL::Mat< T > &a) |
| Other programming style to the NTL::transpose function. More...
|
|
|
These are operator overloads for Mat_64 and Vec_64 types.
Only the overloads we currently use are defined.
|
Vec_64 | operator * (const Vec_64 &vec, std::int64_t a) |
|
Vec_64 | operator * (std::int64_t a, const Vec_64 &vec) |
|
std::int64_t | operator * (const Vec_64 &vec1, const Vec_64 &vec2) |
|
Vec_64 & | operator+= (Vec_64 &vec1, const Vec_64 &vec2) |
|
Vec_64 & | operator-= (Vec_64 &vec1, const Vec_64 &vec2) |
|
Vec_64 & | operator *= (Vec_64 &vec, std::int64_t a) |
|
Mat_64 & | operator *= (Mat_64 &mat, std::int64_t a) |
|
Mat_64 | operator * (const Mat_64 &mat1, const Mat_64 &mat2) |
|
|
These functions perform convertions between different types.
Most of them do not really need explainations, but sometimes a specific logic is used when doing the convertion.
|
void | conv (std::int64_t &l, const char *c) |
| Converts the array of characters (string) c into an std::int64_t l using the strtol() function of cstdlib.h. More...
|
|
void | conv (double &r, const char *c) |
| Converts the array of characters (string) c into a double r using the strtod() function of cstdlib.h. More...
|
|
void | conv (double &x, long long a) |
| Converts a long long to a double . More...
|
|
void | conv (long long &x, double a) |
| Converts a double to a long long . More...
|
|
void | conv (ZZ &x, long long a) |
| Converts a long long to a NTL::ZZ . More...
|
|
void | conv (long long &x, ZZ a) |
| Converts a NTL::ZZ to a long long . More...
|
|
void | conv (long &x, long long a) |
| Converts a long long to a long . More...
|
|
void | conv (long long &x, long a) |
| Converts a long to a long long . More...
|
|
void | conv (long long &x, long long a) |
| Since both are of the same type, this assigns a to x. More...
|
|
|
These functions are already implemented in NTL for NTL::ZZ or NTL::RR types, but not for the other standard types we use.
These overloads allow us to make a simple call the the function in the NTL namespace without worrying about types and still have working algorithms.
|
bool | IsZero (const std::int64_t &x) |
| Returns the bool resulting of the statement x == 0 . More...
|
|
void | clear (double &x) |
| Sets x to 0. More...
|
|
void | clear (std::int64_t &x) |
| Sets x to 0. More...
|
|
std::int64_t | IsOdd (const std::int64_t &x) |
| Tests if x is odd. More...
|
|
void | set (std::int64_t &x) |
| Sets x to 1. More...
|
|
|
These are complementary overloads to NTL power functions.
|
std::int64_t | power (std::int64_t p, std::int64_t i) |
| Returns \(p^i\). More...
|
|
void | power2 (std::int64_t &z, std::int64_t i) |
| Sets \(z = 2^i\). More...
|
|
void | power2 (NTL::ZZ &z, std::int64_t i) |
| Sets \(z = 2^i\). More...
|
|
double | sqrt (const double &a) |
|
double | log (const double x) |
|
double | inv (const double x) |
|
This module contains extensions of certain classes in NTL.
It was previously necessary because NTL and boost (an old dependency) did not use the same function names and indices.
This name conversion was meant to have the same function names in boost and NTL and allows us to have LatticeTester work with either boost library or NTL library depending on preprocessing statements.
New functions have been implemented in this module as a way to overload a few operators and methods of NTL (especially on matrix and vector types) to the usage of NTL::Mat<std::uint64_t>
because some basic utilies do not exist in NTL and we want to support these use cases.