|
| FigureOfMeritM (const NTL::Vec< int64_t > &t, Weights &w, Normalizer &norma, ReducerBB< Int, Real > *red=0, bool includeFirst=false) |
| This constructor will call setTVector (t, includeFirst) , then set the 'Weights', Normalizer , and ReducerBB to the given values.
|
|
virtual | ~FigureOfMeritM () |
|
void | setTVector (const NTL::Vec< int64_t > &t, bool includeFirst) |
| Sets the vector \((t_1,..., t_d)\) in the FOM definition to the vector t .
|
|
void | setWeights (Weights &w) |
| Sets the weights used for calculating the FoM.
|
|
void | setNormalizer (Normalizer &norma) |
| Sets the normalizer to norma .
|
|
void | setLLL (double delta=0.99999) |
| Sets the parameters for the LLL reduction.
|
|
void | setBKZ (double delta=0.99999, int64_t blocksize=10) |
| Sets the parameters for the BKZ reduction.
|
|
void | setBB (bool redBB) |
| The BB method will be applied iff this flag is set to true (the default value).
|
|
void | setReducerBB (ReducerBB< Int, Real > *red) |
| Sets the ReducerBB object that will be used for BB.
|
|
void | setLowBound (double low) |
| Sets the low bound for the FOM.
|
|
void | setVerbosity (int64_t verbose) |
| The level of verbosity in the terminal output.
|
|
void | setCollectLevel (int64_t collect) |
| The level of details in the informations that are collected, such as the worst-case projection, the corresponding shortest vector, its square length, etc.
|
|
double | getMinMeritSqlen () |
| Returns the square length of the shortest vector for the worst-case projection.
|
|
Coordinates | getMinMeritProj () |
| Returns the projection that gives the worst merit value.
|
|
double | computeMeritOneProj (IntLattice< Int, Real > &proj, const Coordinates &coord, double minmerit=DBL_MAX) |
| This function computes and returns the merit value for a single projection represented in lattice proj , in dim dimensions.
|
|
virtual double | computeMeritSucc (IntLatticeExt< Int, Real > &lat, double minmerit=DBL_MAX) |
| This function computes and returns the FOM only for the projections over sets of successive coordinates of the form {1, 2, ..., m_t.length()} to {1, 2, ..., m_t[0]}, and returns the minimum.
|
|
virtual double | computeMeritNonSucc (IntLatticeExt< Int, Real > &lat, IntLattice< Int, Real > &proj, double minmerit=DBL_MAX) |
| This function computes and returns the FOM only for the projections over sets on non-successive coordinates determined by \(S(s,t_s)\) or \(S^{(1)}(s,t_s)\).
|
|
double | computeMerit (IntLatticeExt< Int, Real > &lat, IntLattice< Int, Real > &proj, double minmerit=DBL_MAX) |
| This function computes and returns the value of the FOM for the given lattice 'lat', using the norm associated with that lattice.
|
|
template<typename Int, typename Real>
class LatticeTester::FigureOfMeritM< Int, Real >
This class provides tools to calculate the figure of merit (FOM) \( M_{t_1,\dots,t_d}\) for any given IntLatticeExt
object.
This FOM is defined as
\[
M_{t_1,\dots,t_d} = \min\left[ \min_{I\in S(t_1)} \frac{\ell_I}{ \omega_I\, \ell_I^*(\eta_I)},\;
\min_{2\le s\le d}\, \min_{I\in S(s,t_s)} \frac{\ell_I}{\omega_I \,\ell_I^*(\eta_I)} \right].
\]
In this class, it is computed for the (rescaled) primal lattice and the m-dual is never used. To compute the FOM for the m-dual, see the class FigureOfMeritMDual
. Just using the present class for the dualized primal lattice object will not give correct results, because the projections of the m-dual lattice are not the same as the m-duals of the projections.
In the formula, the projections in \(S(t_1)\) are those over successive coordinates in up to \(t_1\) dimensions, while those is \(S(s,t_s)\) are projections over \(s\) distinct coordinates that are non necessarily successive and are all in the set \(\{1,\dots,t_s\}\), for each order \(s > 1\). There are two variants for the latter: the first (default) variant takes \(S(s,t_s)\) as just defined, and the other considers only the set \(S^{(1)}(s,t_s)\) of projections that contain coordinate 1. The parameter includeFirst
in the constructor determines which variant is taken: the latter option is taken when includeFirst
is set to true
. See the guide for more details and examples.
The lengths of the shortest vectors in the projections can be calculated exactly by using the BB algorithm after applying pre-reductions such as LLL or BKZ, or they can be just approximated by the lengths of the shortest basis vector after applying the pre-reductions only. The latter is faster but may not give a shortest vector. The norm used to compute the vector lengths is always the one inside the IntLattice
object for which we compute the FOM.
The constructor has two template parameters to specify which Int
and Real
types are used. It also requires the vector \((t_1,\dots,t_d)\), a Weights
object to specify the weights \(\omega_I\), a Normalizer
object used to normalize the merit values, a ReducerBB
object used for the reduction in case we want to apply BB, and the includeFirst
parameter in case we want to change it to true
. The last two parameters are optional. The BB is applied if and only if a (nonzero) ReducerBB
is given. Otherwise, we just use static methods for the reduction and need no Reducer
. By default, the pre-reduction method is BKZ with delta = 0.99999
and blocksize = 10
. To change these values and/or apply LLL, one can use setBKZ
and/or setLLL
. The reductions are always applied in the order: LLL, BKZ, BB. To remove LLL or BKZ, it suffices to set its delta
parameter to 0.0.
After a FigureOfMeritM
has been created by the constructor, one can use setTVector
to set (or reset) the vector \((t_1,\dots,t_d)\), setWeights
to change the weights, setLLL
or setBKZ
to change the LLL or BKZ parameters, etc.
The method computeMerit
computes the FOM for a given lattice. The computation is stopped (early exit) as soon as we know that the value of the FOM will be below the lower bound, whose value can be changed via setLowBound
. The default value is 0.