LatNet Builder Manual 2.1.3-6
Software Package for Constructing Highly Uniform Point Sets
|
The two floowing two classes are copies from NTL::Vec<T> and NTL::Mat<T>, but they contain additional member functions having same names to the ones used in boost library. More...
Classes | |
class | matrix |
A subclass of the NTL::Mat<T> class. More... | |
class | matrix_row |
An extension of NTL::vector<T> implemented in this module to be used as a matrix row. More... | |
class | polynomial |
class | vector |
A subclass of the NTL::Vec<T> class. More... |
Typedefs | |
typedef Mat< std::int64_t > | Mat_64 |
Renaming this supported type for convenience. | |
typedef Vec< std::int64_t > | Vec_64 |
Renaming this supported type for convenience. |
Functions | |
bool | operator< (const GF2X &x, const GF2X &y) |
comparing NTL::GF2X objects | |
bool | operator< (const GF2E &x, const GF2E &y) |
comparing NTL::GF2E objects | |
NTL_SNS ostream & | operator<< (NTL_SNS ostream &s, const polynomial &a) |
void | ident (Mat_64 &mat, long dim) |
Transforms mat into the identity matrix of dimensions \(\text{dim}\times\text{dim}\). | |
template<typename T> | |
void | transpose (NTL::Mat< T > &X, const NTL::Mat< T > &A) |
Transposes A into X. | |
template<typename T> | |
NTL::Mat< T > | transpose (const NTL::Mat< T > &a) |
Other programming style to the NTL::transpose function. | |
double | determinant (const NTL::matrix< std::int64_t > &mat) |
Operator overloads | |
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) |
Some other compatibility utilities | |
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. | |
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. | |
void | conv (double &x, long long a) |
Converts a long long to a double. | |
void | conv (long long &x, double a) |
Converts a double to a long long. | |
void | conv (ZZ &x, long long a) |
Converts a long long to a NTL::ZZ. | |
void | conv (long long &x, ZZ a) |
Converts a NTL::ZZ to a long long. | |
void | conv (long &x, long long a) |
Converts a long long to a long. | |
void | conv (long long &x, long a) |
Converts a long to a long long. | |
void | conv (long long &x, long long a) |
Since both are of the same type, this assigns a to x. | |
void | conv (long long &x, RR a) |
Function overloads | |
bool | IsZero (const std::int64_t &x) |
Returns the bool resulting of the statement x == 0. | |
void | clear (double &x) |
Sets x to 0. | |
void | clear (std::int64_t &x) |
Sets x to 0. | |
std::int64_t | IsOdd (const std::int64_t &x) |
Tests if x is odd. | |
void | set (std::int64_t &x) |
Sets x to 1. | |
Mathematical functions | |
These are complementary overloads to NTL power functions. | |
std::int64_t | power (std::int64_t p, std::int64_t i) |
Returns \(p^i\). | |
void | power2 (std::int64_t &z, std::int64_t i) |
Sets \(z = 2^i\). | |
void | power2 (NTL::ZZ &z, std::int64_t i) |
Sets \(z = 2^i\). | |
double | sqrt (const double &a) |
double | log (const double x) |
double | inv (const double x) |
The two floowing two classes are copies from NTL::Vec<T> and NTL::Mat<T>, but they contain additional member functions having same names to the ones used in boost library.
This module contains extensions of certain classes in NTL.
This name conversion is meant to have the samee function names in boost and 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.
|
inline |
Converts a long long to a long.
This will truncate a if it has to many digits.
|
inline |
Converts a double to a long long.
This truncates the decimals of a.
|
inline |
Converts a NTL::ZZ to a long long.
This will truncate a if it has to many digits.
References conv().
|
inline |
Tests if x is odd.
Returns 1 if it is odd, and 0 if it is even.
|
inline |
Returns the bool resulting of the statement x == 0.
IsZero is already defined for the type NTL::ZZ in NTL, but not for std::int64_t.
Referenced by LatticeTester::BasisConstruction< BasInt >::DualConstruction(), LatticeTester::Euclide(), and LatticeTester::Triangularization().
void NTL::transpose | ( | NTL::Mat< T > & | X, |
const NTL::Mat< T > & | A ) |
Transposes A into X.
This is a template overload of the transpose function of NTL. This does basically the same thing as the implementation NTL uses. It might be necessary to implement the swap function for the type T for this to work.
Referenced by LatticeTester::BasisConstruction< BasInt >::ProjectionConstruction(), and transpose().