test_svp_gram.cpp File Reference
Macros | |
#define | TESTDATADIR ".." |
Enumerations | |
enum | Test { SVP_ENUM , DSVP_ENUM , DSVP_REDUCE , SVP_ENUM , DSVP_ENUM , DSVP_REDUCE } |
Functions | |
template<class ZT , class FT > | |
int | test_svp (ZZ_mat< ZT > &G, vector< Z_NR< mpz_t > > &b) |
Test if SVP function returns vector with right norm. More... | |
template<class ZT > | |
int | dual_length (FP_NR< mpfr_t > &norm, ZZ_mat< ZT > &G, const vector< Z_NR< mpz_t > > &coords) |
Compute the norm of a dual vector (specified by coefficients in the dual basis). More... | |
template<class ZT > | |
int | test_dual_svp (ZZ_mat< ZT > &G, vector< Z_NR< mpz_t > > &b) |
Test if dual SVP function returns vector with right norm. More... | |
template<class ZT > | |
int | test_dsvp_reduce (ZZ_mat< ZT > &G, vector< Z_NR< mpz_t > > &b) |
Test if dual SVP reduction returns reduced basis. More... | |
template<class ZT , class FT > | |
int | test_filename (const char *input_filename, const char *output_filename, const Test test=SVP_ENUM) |
Test if SVP function returns vector with right norm. More... | |
int | main () |
Run SVP tests. More... | |
Macro Definition Documentation
◆ TESTDATADIR
#define TESTDATADIR ".." |
Enumeration Type Documentation
◆ Test
enum Test |
Function Documentation
◆ dual_length()
template<class ZT >
int dual_length | ( | FP_NR< mpfr_t > & | norm, |
ZZ_mat< ZT > & | G, | ||
const vector< Z_NR< mpz_t > > & | coords | ||
) |
Compute the norm of a dual vector (specified by coefficients in the dual basis).
- Parameters
-
A input lattice b coefficients of shortest dual vector
- Returns
◆ main()
int main | ( | ) |
Run SVP tests.
- Returns
◆ test_dsvp_reduce()
Test if dual SVP reduction returns reduced basis.
- Parameters
-
A input lattice b shortest dual vector
- Returns
◆ test_dual_svp()
Test if dual SVP function returns vector with right norm.
- Parameters
-
A input lattice b shortest dual vector
- Returns
◆ test_filename()
template<class ZT , class FT >
int test_filename | ( | const char * | input_filename, |
const char * | output_filename, | ||
const Test | test = SVP_ENUM |
||
) |
Test if SVP function returns vector with right norm.
- Parameters
-
input_filename filename of an input lattice output_filename filename of a shortest vector
- Returns