test_cvp.cpp File Reference
#include <cstring>
#include <fplll.h>
#include <test_utils.h>

Macros

#define TESTDATADIR   ".."
 

Functions

template<class ZT >
int test_cvp (ZZ_mat< ZT > &A, vector< Z_NR< mpz_t > > &target, vector< Z_NR< mpz_t > > &b, const int method)
 Test if CVP function returns correct vector. More...
 
template<class ZT >
int test_filename (const char *input_filename_lattice, const char *input_filename_target, const char *output_filename, const int method=CVPM_FAST)
 Test if CVP function returns the correct vector. More...
 
int main (int argc, char *argv[])
 Run CVP tests. More...
 

Macro Definition Documentation

◆ TESTDATADIR

#define TESTDATADIR   ".."

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Run CVP tests.

Parameters
argcignored
argvignored
Returns

◆ test_cvp()

template<class ZT >
int test_cvp ( ZZ_mat< ZT > &  A,
vector< Z_NR< mpz_t > > &  target,
vector< Z_NR< mpz_t > > &  b,
const int  method 
)

Test if CVP function returns correct vector.

Parameters
Ainput lattice
bexpected vector
Returns

◆ test_filename()

template<class ZT >
int test_filename ( const char *  input_filename_lattice,
const char *  input_filename_target,
const char *  output_filename,
const int  method = CVPM_FAST 
)

Test if CVP function returns the correct vector.

Parameters
input_filename_latticefilename of an input lattice
input_filename_targetfilename of a target vector
output_filenamefilename of the expected vector
Returns