LatMRG Guide  1.0
A software package to test and search for new linear congruential random number generators
LatMRG::FigureOfMerit< Lat > Class Template Reference

This class is intended to store everything you might need after performing computations on a lattice. More...

#include <latmrg/FigureOfMerit.h>

Public Member Functions

 FigureOfMerit ()
 
 FigureOfMerit (Lat &lattice, const Projections &proj)
 Initializes the object for lattice and proj. More...
 
void addMerit (std::vector< Dbl > &merits, std::vector< typename Lat::IntVec > &vectors)
 Sets m_merits to merits and m_vectors to vectors. More...
 
void computeMerit (const std::string strat)
 Computes the minimum, if strat == "min", or the maximum, if strat == "max", of m_merits and stores it in m_merit. More...
 
bool finished ()
 Returns m_finished. More...
 
std::string getLattice ()
 Returns the string associated with this test. More...
 
Dbl getMerit ()
 Returns m_merit. More...
 
bool operator!= (const FigureOfMerit< Lat > &right)
 Compares m_merit. More...
 
bool operator< (const FigureOfMerit< Lat > &right)
 Compares m_merit. More...
 
bool operator<= (const FigureOfMerit< Lat > &right)
 Compares m_merit. More...
 
bool operator== (const FigureOfMerit< Lat > &right)
 Compares m_merit. More...
 
bool operator> (const FigureOfMerit< Lat > &right)
 Compares m_merit. More...
 
bool operator>= (const FigureOfMerit< Lat > &right)
 Compares m_merit. More...
 
void setFinished ()
 Sets finished to true. More...
 
std::string toStringDim ()
 Returns a string containing the merit of the generator for each dimension. More...
 
std::string toStringMerit ()
 Returns a string containing the merit of the generator, the projection for which this is obtained and the shortest vector for this projection. More...
 
std::string toStringProjections ()
 Returns a string that contains the merit for all projections and the shortest vector for all projections. More...
 
LatticeTester::Coordinates worstProj ()
 
Lat::IntVec worstVect ()
 Returns the shortest vector in the lattice for the worst projection. More...
 

Private Types

typedef Lat::Float Dbl
 
typedef Lat::Integ Int
 

Private Attributes

long m_best_worst
 Indice of the best or worst value in m_merits. More...
 
bool m_finished
 true if this contains a merit value for all projections, false otherwise. More...
 
Lat m_lattice
 The lattice that has been tested. More...
 
Dbl m_merit
 The merit of the lattice. More...
 
std::vector< Dblm_merits
 The merit for each test in the same sequence as the projections in m_projSet. More...
 
Projections m_projSet
 The projections used in this object. More...
 
std::vector< typename Lat::IntVec > m_vectors
 The shortest vectors for each projection in the same sequence as in m_projSet. More...
 

Detailed Description

template<typename Lat>
class LatMRG::FigureOfMerit< Lat >

This class is intended to store everything you might need after performing computations on a lattice.

It is intended as a return type for functions actually performing the computations.

Member Typedef Documentation

◆ Dbl

template<typename Lat >
typedef Lat::Float LatMRG::FigureOfMerit< Lat >::Dbl
private

◆ Int

template<typename Lat >
typedef Lat::Integ LatMRG::FigureOfMerit< Lat >::Int
private

Constructor & Destructor Documentation

◆ FigureOfMerit() [1/2]

template<typename Lat >
LatMRG::FigureOfMerit< Lat >::FigureOfMerit ( )
inline

◆ FigureOfMerit() [2/2]

template<typename Lat >
LatMRG::FigureOfMerit< Lat >::FigureOfMerit ( Lat &  lattice,
const Projections proj 
)
inline

Initializes the object for lattice and proj.

This won't contain any merit value.

Member Function Documentation

◆ addMerit()

template<typename Lat >
void LatMRG::FigureOfMerit< Lat >::addMerit ( std::vector< Dbl > &  merits,
std::vector< typename Lat::IntVec > &  vectors 
)
inline

Sets m_merits to merits and m_vectors to vectors.

◆ computeMerit()

template<typename Lat >
void LatMRG::FigureOfMerit< Lat >::computeMerit ( const std::string  strat)
inline

Computes the minimum, if strat == "min", or the maximum, if strat == "max", of m_merits and stores it in m_merit.

◆ finished()

template<typename Lat >
bool LatMRG::FigureOfMerit< Lat >::finished ( )
inline

Returns m_finished.

◆ getLattice()

template<typename Lat >
std::string LatMRG::FigureOfMerit< Lat >::getLattice ( )
inline

Returns the string associated with this test.

◆ getMerit()

template<typename Lat >
Dbl LatMRG::FigureOfMerit< Lat >::getMerit ( )
inline

Returns m_merit.

◆ operator!=()

template<typename Lat >
bool LatMRG::FigureOfMerit< Lat >::operator!= ( const FigureOfMerit< Lat > &  right)
inline

Compares m_merit.

Uses operator==.

◆ operator<()

template<typename Lat >
bool LatMRG::FigureOfMerit< Lat >::operator< ( const FigureOfMerit< Lat > &  right)
inline

Compares m_merit.

"Implements" the comparison.

◆ operator<=()

template<typename Lat >
bool LatMRG::FigureOfMerit< Lat >::operator<= ( const FigureOfMerit< Lat > &  right)
inline

Compares m_merit.

Uses operator>.

◆ operator==()

template<typename Lat >
bool LatMRG::FigureOfMerit< Lat >::operator== ( const FigureOfMerit< Lat > &  right)
inline

Compares m_merit.

"Implements" the comparison.

◆ operator>()

template<typename Lat >
bool LatMRG::FigureOfMerit< Lat >::operator> ( const FigureOfMerit< Lat > &  right)
inline

Compares m_merit.

"Implements" the comparison.

◆ operator>=()

template<typename Lat >
bool LatMRG::FigureOfMerit< Lat >::operator>= ( const FigureOfMerit< Lat > &  right)
inline

Compares m_merit.

Uses operator<.

◆ setFinished()

template<typename Lat >
void LatMRG::FigureOfMerit< Lat >::setFinished ( )
inline

Sets finished to true.

◆ toStringDim()

template<typename Lat >
std::string LatMRG::FigureOfMerit< Lat >::toStringDim ( )
inline

Returns a string containing the merit of the generator for each dimension.

This is, for each dimension, this will return the merit, worst projection and shortest vector for this projection. This may take some time because the merit is not pre computed for all projections.

◆ toStringMerit()

template<typename Lat >
std::string LatMRG::FigureOfMerit< Lat >::toStringMerit ( )
inline

Returns a string containing the merit of the generator, the projection for which this is obtained and the shortest vector for this projection.

◆ toStringProjections()

template<typename Lat >
std::string LatMRG::FigureOfMerit< Lat >::toStringProjections ( )
inline

Returns a string that contains the merit for all projections and the shortest vector for all projections.

This string is very long.

◆ worstProj()

template<typename Lat >
LatticeTester::Coordinates LatMRG::FigureOfMerit< Lat >::worstProj ( )
inline

◆ worstVect()

template<typename Lat >
Lat::IntVec LatMRG::FigureOfMerit< Lat >::worstVect ( )
inline

Returns the shortest vector in the lattice for the worst projection.

Member Data Documentation

◆ m_best_worst

template<typename Lat >
long LatMRG::FigureOfMerit< Lat >::m_best_worst
private

Indice of the best or worst value in m_merits.

◆ m_finished

template<typename Lat >
bool LatMRG::FigureOfMerit< Lat >::m_finished
private

true if this contains a merit value for all projections, false otherwise.

◆ m_lattice

template<typename Lat >
Lat LatMRG::FigureOfMerit< Lat >::m_lattice
private

The lattice that has been tested.

◆ m_merit

template<typename Lat >
Dbl LatMRG::FigureOfMerit< Lat >::m_merit
private

The merit of the lattice.

◆ m_merits

template<typename Lat >
std::vector<Dbl> LatMRG::FigureOfMerit< Lat >::m_merits
private

The merit for each test in the same sequence as the projections in m_projSet.

◆ m_projSet

template<typename Lat >
Projections LatMRG::FigureOfMerit< Lat >::m_projSet
private

The projections used in this object.

◆ m_vectors

template<typename Lat >
std::vector<typename Lat::IntVec> LatMRG::FigureOfMerit< Lat >::m_vectors
private

The shortest vectors for each projection in the same sequence as in m_projSet.


The documentation for this class was generated from the following file: