test_bkz.cpp File Reference
#include "io/json.hpp"
#include <cstring>
#include <fplll.h>
#include <test_utils.h>

Macros

#define TESTDATADIR   ".."
 

Typedefs

using json = nlohmann::json
 

Functions

template<class ZT >
int test_bkz (ZZ_mat< ZT > &A, const int block_size, FloatType float_type, int flags=BKZ_DEFAULT, int prec=0)
 Test BKZ reduction. More...
 
template<class ZT >
int test_bkz_param (ZZ_mat< ZT > &A, const int block_size, int flags=BKZ_DEFAULT, string dump_gso_filename=string())
 Test BKZ strategy interface. More...
 
template<class ZT >
int test_bkz_param_linear_pruning (ZZ_mat< ZT > &A, const int block_size, int flags=BKZ_DEFAULT)
 Test BKZ with pruning. More...
 
template<class ZT >
int test_bkz_param_pruning (ZZ_mat< ZT > &A, const int block_size, int flags=BKZ_DEFAULT)
 
template<class ZT >
int test_int_rel_bkz_dump_gso (int d, int b, const int block_size, int flags=BKZ_DEFAULT|BKZ_DUMP_GSO)
 Test BKZ_DUMP_GSO for a matrix d × (d+1) integer relations matrix with bit size b (copied from test_int_rel) More...
 
template<class ZT >
int test_filename (const char *input_filename, const int block_size, FloatType float_type=FT_DEFAULT, int flags=BKZ_DEFAULT, int prec=0)
 Test BKZ for matrix stored in file pointed to by input_filename. More...
 
template<class ZT >
int test_int_rel (int d, int b, const int block_size, FloatType float_type=FT_DEFAULT, int flags=BKZ_DEFAULT, int prec=0)
 Construct d × (d+1) integer relations matrix with bit size b and test BKZ. More...
 
int test_linear_dep ()
 
int main (int, char **)
 

Macro Definition Documentation

◆ TESTDATADIR

#define TESTDATADIR   ".."

Typedef Documentation

◆ json

using json = nlohmann::json

Function Documentation

◆ main()

int main ( int  ,
char **   
)

◆ test_bkz()

template<class ZT >
int test_bkz ( ZZ_mat< ZT > &  A,
const int  block_size,
FloatType  float_type,
int  flags = BKZ_DEFAULT,
int  prec = 0 
)

Test BKZ reduction.

Parameters
Atest matrix
block_sizeblock size
float_typefloating point type to test
flagsflags to use
precprecision if mpfr is used
Returns
zero on success.

◆ test_bkz_param()

template<class ZT >
int test_bkz_param ( ZZ_mat< ZT > &  A,
const int  block_size,
int  flags = BKZ_DEFAULT,
string  dump_gso_filename = string() 
)

Test BKZ strategy interface.

Parameters
Atest matrix
block_sizeblock size
Returns
zero on success.

◆ test_bkz_param_linear_pruning()

template<class ZT >
int test_bkz_param_linear_pruning ( ZZ_mat< ZT > &  A,
const int  block_size,
int  flags = BKZ_DEFAULT 
)

Test BKZ with pruning.

Parameters
Atest matrix
block_sizeblock size
Returns
zero on success.

◆ test_bkz_param_pruning()

template<class ZT >
int test_bkz_param_pruning ( ZZ_mat< ZT > &  A,
const int  block_size,
int  flags = BKZ_DEFAULT 
)

◆ test_filename()

template<class ZT >
int test_filename ( const char *  input_filename,
const int  block_size,
FloatType  float_type = FT_DEFAULT,
int  flags = BKZ_DEFAULT,
int  prec = 0 
)

Test BKZ for matrix stored in file pointed to by input_filename.

Parameters
input_filenamea path
block_sizeblock size
float_typefloating point type to test
flagsflags to use
precprecision if mpfr is used
Returns
zero on success

◆ test_int_rel()

template<class ZT >
int test_int_rel ( int  d,
int  b,
const int  block_size,
FloatType  float_type = FT_DEFAULT,
int  flags = BKZ_DEFAULT,
int  prec = 0 
)

Construct d × (d+1) integer relations matrix with bit size b and test BKZ.

Parameters
ddimension
bbit size
block_sizeblock size
float_typefloating point type to test
flagsflags to use
precprecision if mpfr is used
Returns
zero on success

◆ test_int_rel_bkz_dump_gso()

template<class ZT >
int test_int_rel_bkz_dump_gso ( int  d,
int  b,
const int  block_size,
int  flags = BKZ_DEFAULT | BKZ_DUMP_GSO 
)

Test BKZ_DUMP_GSO for a matrix d × (d+1) integer relations matrix with bit size b (copied from test_int_rel)

Parameters
ddimension
bbit size
block_sizeblock size
float_typefloating point type to test
flagsflags to use
Returns
zero on success.

◆ test_linear_dep()

int test_linear_dep ( )