enumerate_ext_api.h File Reference
#include <array>
#include <cstdint>
#include <functional>
#include <memory>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FPLLL_EXTENUM_MAX_EXTENUM_DIM   1024
 

Typedefs

typedef double fplll_extenum_enumf
 
typedef void() extenum_cb_set_config(fplll_extenum_enumf *mu, std::size_t mudim, bool mutranspose, fplll_extenum_enumf *rdiag, fplll_extenum_enumf *pruning)
 
typedef fplll_extenum_enumf() extenum_cb_process_sol(fplll_extenum_enumf dist, fplll_extenum_enumf *sol)
 
typedef void() extenum_cb_process_subsol(fplll_extenum_enumf dist, fplll_extenum_enumf *subsol, int offset)
 
typedef fplll_extenum_enumf maxdist
 
typedef fplll_extenum_enumf std::function< extenum_cb_set_configcbfunc
 
typedef fplll_extenum_enumf std::function< extenum_cb_set_config > std::function< extenum_cb_process_solcbsol
 
typedef fplll_extenum_enumf std::function< extenum_cb_set_config > std::function< extenum_cb_process_sol > std::function< extenum_cb_process_subsolcbsubsol
 
typedef fplll_extenum_enumf std::function< extenum_cb_set_config > std::function< extenum_cb_process_sol > std::function< extenum_cb_process_subsol > bool dual
 
typedef fplll_extenum_enumf std::function< extenum_cb_set_config > std::function< extenum_cb_process_sol > std::function< extenum_cb_process_subsol > bool bool findsubsols
 

Functions

typedef std::array< std::uint64_t, FPLLL_EXTENUM_MAX_EXTENUM_DIM > (extenum_fc_enumerate)(const int dim
 

Macro Definition Documentation

◆ FPLLL_EXTENUM_MAX_EXTENUM_DIM

#define FPLLL_EXTENUM_MAX_EXTENUM_DIM   1024

Typedef Documentation

◆ cbfunc

◆ cbsol

◆ cbsubsol

◆ dual

typedef fplll_extenum_enumf std::function<extenum_cb_set_config> std::function<extenum_cb_process_sol> std::function<extenum_cb_process_subsol> bool dual

◆ extenum_cb_process_sol

typedef fplll_extenum_enumf() extenum_cb_process_sol(fplll_extenum_enumf dist, fplll_extenum_enumf *sol)

Callback function given to external enumeration library. Passes a new solution and its length to Evaluator, returning the new enumeration bound.

Parameters
[in]dist- the norm of the new solution.
[in]sol- a pointer to the new solution.
Returns
The new enumeration bound.

◆ extenum_cb_process_subsol

typedef void() extenum_cb_process_subsol(fplll_extenum_enumf dist, fplll_extenum_enumf *subsol, int offset)

Callback function given to external enumeration library.

Pass a subsolution and its partial length to Evaluator.

◆ extenum_cb_set_config

FPLLL_BEGIN_NAMESPACE using::extenum_cb_set_config

Callback function given to external enumeration library.

Parameters
[out]mu- this is a pointer to an array 'enumf mu[mudim][mudim]'. Upon return, this array will contain the mu values for the lattice basis. Note that the array pointed to by this argument needs to be contiguous, otherwise there will be write errors. This means that the only acceptable arguments are pointers to variable-length arrays, 1D std::vector of dimension mudim*mudim, or 1D raw(resp. std::array) arrays of dimension mudim*mudim.
[in]mudim- the number of rows(resp. columns) in the mu array.
[out]mutranspose- when true, mutranspose is stored in the mu param. Otherwise, mu is stored in the mu param. Storing mutranspose allows for more efficient memory access, as accesses will be contiguous.
[out]rdiag- a pointer to an array 'enumf rdiag[mudim]'. Upon return, this will contain the squared norms of the Gram-Schmidt vectors.
[out]pruning- a pointer to an array 'enumf pruning[mudim]'. Upon return, this will contain the pruning coefficients for enumeration. In rigorous enumeration, this array will consist solely of 1's.

◆ findsubsols

typedef fplll_extenum_enumf std::function<extenum_cb_set_config> std::function<extenum_cb_process_sol> std::function<extenum_cb_process_subsol> bool bool findsubsols

◆ fplll_extenum_enumf

typedef double fplll_extenum_enumf

◆ maxdist

Function Documentation

◆ std::array< std::uint64_t, FPLLL_EXTENUM_MAX_EXTENUM_DIM >()

typedef std::array< std::uint64_t, FPLLL_EXTENUM_MAX_EXTENUM_DIM > ( extenum_fc_enumerate  ) const

External enumeration function prototype.

Parameters
dimenumeration dimension.
maxdistinitial enumeration bound.
cbfuncgiven callback function to get mu, rdiag, pruning
cbsolgiven callback function to pass solution and its length to Evaluator, it returns new enumeration bound
cbsubsolgiven callback function to pass subsolution and its length to Evaluator
dualdo dual SVP enumeration
findsubsolsfind subsolutions and pass them to Evaluator
Returns
number of nodes visited. Or ~uint64_t(0) when instance is not supported in which case fplll falls back to its own enumeration.