bkz.cpp File Reference
#include <iomanip>
#include "bkz.h"
#include "bkz_param.h"
#include "enum/enumerate.h"
#include "util.h"
#include "wrapper.h"
Functions | |
template<class FT > | |
int | bkz_reduction_f (ZZ_mat< mpz_t > &b, const BKZParam ¶m, int sel_ft, double lll_delta, ZZ_mat< mpz_t > &u, ZZ_mat< mpz_t > &u_inv) |
int | bkz_reduction (ZZ_mat< mpz_t > *B, ZZ_mat< mpz_t > *U, const BKZParam ¶m, FloatType float_type, int precision) |
Performs block reduction using BKZParam object. More... | |
int | bkz_reduction (ZZ_mat< mpz_t > &b, int block_size, int flags, FloatType float_type, int precision) |
Performs block reduction without transformation matrix. More... | |
int | bkz_reduction (ZZ_mat< mpz_t > &b, ZZ_mat< mpz_t > &u, int block_size, int flags, FloatType float_type, int precision) |
Performs block reduction with transformation matrix. More... | |
int | hkz_reduction (ZZ_mat< mpz_t > &b, int flags, FloatType float_type, int precision) |
Performs HKZ reduction. More... | |
Function Documentation
◆ bkz_reduction() [1/3]
int bkz_reduction | ( | ZZ_mat< mpz_t > & | b, |
int | block_size, | ||
int | flags = BKZ_DEFAULT , |
||
FloatType | float_type = FT_DEFAULT , |
||
int | precision = 0 |
||
) |
Performs block reduction without transformation matrix.
Creates a parameter object corresponding to the parameters and calls bkz_reduction on it.
- Parameters
-
b basis of the lattice to be reduced block_size block_size of the reduction flags different flags for reduction (see defs.h and bkz_param.h for more information) float_type specifies the data type used for GSO computations (see defs.h for options) precision specifies the precision if float_type=FT_MPFR (and needs to be > 0 in that case) ignored otherwise
- Returns
- the status of the reduction (see defs.h for more information on the status)
◆ bkz_reduction() [2/3]
int bkz_reduction | ( | ZZ_mat< mpz_t > & | b, |
ZZ_mat< mpz_t > & | u, | ||
int | block_size, | ||
int | flags = BKZ_DEFAULT , |
||
FloatType | float_type = FT_DEFAULT , |
||
int | precision = 0 |
||
) |
Performs block reduction with transformation matrix.
Creates a parameter object corresponding to the parameters and calls bkz_reduction on it.
- Parameters
-
b basis of the lattice to be reduced u transformation matrix block_size block_size of the reduction flags different flags for reduction (see defs.h and bkz_param.h for more information) float_type specifies the data type used for GSO computations (see defs.h for options) precision specifies the precision if float_type=FT_MPFR (and needs to be > 0 in that case) ignored otherwise
- Returns
- the status of the reduction (see defs.h for more information on the status)
◆ bkz_reduction() [3/3]
int bkz_reduction | ( | ZZ_mat< mpz_t > * | B, |
ZZ_mat< mpz_t > * | U, | ||
const BKZParam & | param, | ||
FloatType | float_type = FT_DEFAULT , |
||
int | precision = 0 |
||
) |
Performs block reduction using BKZParam object.
- Parameters
-
B basis of the lattice to be reduced U transformation matrix (pass an empty matrix to ignore this option) param parameter object float_type specifies the data type used for GSO computations (see defs.h for options) precision specifies the precision if float_type=FT_MPFR (and needs to be > 0 in that case) ignored otherwise
- Returns
- the status of the reduction (see defs.h for more information on the status)
◆ bkz_reduction_f()
template<class FT >
int bkz_reduction_f | ( | ZZ_mat< mpz_t > & | b, |
const BKZParam & | param, | ||
int | sel_ft, | ||
double | lll_delta, | ||
ZZ_mat< mpz_t > & | u, | ||
ZZ_mat< mpz_t > & | u_inv | ||
) |
◆ hkz_reduction()
int hkz_reduction | ( | ZZ_mat< mpz_t > & | b, |
int | flags = HKZ_DEFAULT , |
||
FloatType | float_type = FT_DEFAULT , |
||
int | precision = 0 |
||
) |
Performs HKZ reduction.
Creates a parameter object corresponding to the parameters (and block size equal to the dimension) and calls bkz_reduction on it.
- Parameters
-
b basis of the lattice to be reduced flags flags for reduction (HKZ_DEFAULT or HKZ_VERBOSE) float_type specifies the data type used for GSO computations (see defs.h for options) precision specifies the precision if float_type=FT_MPFR (and needs to be > 0 in that case) ignored otherwise
- Returns
- the status of the reduction (see defs.h for more information on the status)