LatNet Builder Manual
2.0.1-11
Software Package for Constructing Highly Uniform Point Sets
|
This class gathers other classes of LatticeTester to create an object performing tests on lattices. More...
#include <LatticeAnalysis.h>
Public Member Functions | |
LatticeAnalysis () | |
Base constructor. More... | |
LatticeAnalysis (Reducer< Int, BasInt, Dbl, RedDbl > &reducer, CriterionType criterion, NormaType normaType, PreReductionType preRed, NormType norm, int alpha=0, std::int64_t maxNodesBB=10000000) | |
Constructor. More... | |
~LatticeAnalysis () | |
Destructor. | |
bool | doTest (double fact, PrecisionType precision, int blocksize=20) |
Performs the test in dimension dim . More... | |
void | printTestResults () |
int | doTestFromInputFile (const char *datafile) |
Reads the parameters of the test in input text file datafile ; then do the test. More... | |
int | doTestFromDirectory (const char *dirname) |
Applies the method doTest to all the files with extension ".dat" in directory named dirname . More... | |
void | initNormalizer (NormaType norma, int alpha=0) |
Initialize m_normalizer to a pointer on a normalizer object of type norma. | |
double | getMerit () const |
Gets the results of the applied test. | |
void | setReducer (Reducer< Int, BasInt, Dbl, RedDbl > &red) |
Set functions. | |
void | setCriterion (CriterionType criterion) |
void | setNormalizerType (NormaType normalizerType) |
void | setNormalizer (Normalizer< RedDbl > *normalizer) |
void | setPreReduction (PreReductionType preRed) |
void | setNorm (NormType norm) |
void | setDim (int dim) |
void | setMaxNodesBB (std::int64_t maxNodesBB) |
int | getDim () |
Get functions. | |
Reducer< Int, BasInt, Dbl, RedDbl > * | getReducer () |
Normalizer< RedDbl > * | getNormalizer () |
This class gathers other classes of LatticeTester to create an object performing tests on lattices.
These tests are applied on lattices to assess their structural properties and their qualities with respect to different criteria. Included are well-known tests such as the spectral test, the Beyer test, the \(P_{\alpha}\) test. The corresponding figures of merit for the lattice are the length of the shortest vector in the lattice computed with different norms, the Beyer quotient, or the \(P_{\alpha}\) criterion. For the standard spectral test, the figure of merit is based on the length of the shortest non-zero vector in the lattice, using the \({\mathcal{L}}_2\) norm to compute the length of vectors, and the inverse of this length gives the maximal distance between successive hyperplanes covering all the points in the primal lattice. If one computes the length of the shortest non-zero vector in the dual lattice using the \({\mathcal{L}}_1\) norm, one obtains the minimal number of hyperplanes covering all the points of the primal lattice.
LatticeTester::LatticeAnalysis< Int, BasInt, Dbl, RedDbl >::LatticeAnalysis | ( | ) |
Base constructor.
The test will be applied on lattice
, with the selected normalizer
.
LatticeTester::LatticeAnalysis< Int, BasInt, Dbl, RedDbl >::LatticeAnalysis | ( | Reducer< Int, BasInt, Dbl, RedDbl > & | reducer, |
CriterionType | criterion, | ||
NormaType | normaType, | ||
PreReductionType | preRed, | ||
NormType | norm, | ||
int | alpha = 0 , |
||
std::int64_t | maxNodesBB = 10000000 |
||
) |
Constructor.
The test will be applied on lattice
, with the selected normalizer
and criterion
.
bool LatticeTester::LatticeAnalysis< Int, BasInt, Dbl, RedDbl >::doTest | ( | double | fact, |
PrecisionType | precision, | ||
int | blocksize = 20 |
||
) |
Performs the test in dimension dim
.
The method returns false
if the test was interrupted for any reason before completion, and it returns true
upon success. The result of the test is kept in m_merit
.
int LatticeTester::LatticeAnalysis< Int, BasInt, Dbl, RedDbl >::doTestFromDirectory | ( | const char * | dirname | ) |
Applies the method doTest
to all the files with extension ".dat"
in directory named dirname
.
Returns 0 if all the tests completed successfully; returns a non-zero integer if there was an error.
int LatticeTester::LatticeAnalysis< Int, BasInt, Dbl, RedDbl >::doTestFromInputFile | ( | const char * | datafile | ) |
Reads the parameters of the test in input text file datafile
; then do the test.
The data file must always have the extension ".dat"
, but must be given as argument here without extension. For example, if the data file is named myLattice.dat
, then the method must be called as doTest("myLattice")
. Returns 0 if the test completed successfully; returns a negative integer if there was an error.
References LatticeTester::LatticeTesterConfig< Int, BasIntMat >::basis, LatticeTester::LatticeTesterConfig< Int, BasIntMat >::blocksize, LatticeTester::LatticeTesterConfig< Int, BasIntMat >::fact, LatticeTester::LatticeTesterConfig< Int, BasIntMat >::maxNodesBB, LatticeTester::MyExit(), LatticeTester::LatTestWriter< Int >::newLine(), LatticeTester::LatticeTesterConfig< Int, BasIntMat >::norm, LatticeTester::LatticeTesterConfig< Int, BasIntMat >::normalizer, LatticeTester::LatticeTesterConfig< Int, BasIntMat >::outputType, LatticeTester::LatticeTesterConfig< Int, BasIntMat >::precision, LatticeTester::LatticeTesterConfig< Int, BasIntMat >::prereduction, LatticeTester::LatticeTesterConfig< Int, BasIntMat >::test, and LatticeTester::LatTestWriter< Int >::writeString().