Lattice Tester Guide  1.0-9
Software Package For Testing The Uniformity Of Integral Lattices In The Real Space
LatticeTester::Lacunary< BasInt > Class Template Reference

This class represents a set of indices with lacunary values. More...

#include <latticetester/Lacunary.h>

Public Member Functions

 Lacunary (const BasIntVec &C, int t)
 Constructor for a set of \(t\) indices given in the vector C. More...
 
 Lacunary (int t=0)
 Constructor for an empty set of \(t\) lacunary indices. More...
 
 ~Lacunary ()
 Destructor. More...
 
BasInt & operator[] (int i)
 Returns a reference to the value of m_lac[i]. More...
 
BasInt & getLac (int i)
 Calling the object.getLac(i) gives the same result than calling object[i]. More...
 
int getSize () const
 Returns the size of the set, that is the number of elements in the vector of indices. More...
 
bool calcIndicesStreams (int s, int w, int maxDim)
 Fills the values of this object with maxDim indices starting from 0 by groups of \(s\), spaced apart by \(2^w\). More...
 
std::string toString () const
 Returns a string that describes this object. More...
 

Detailed Description

template<typename BasInt>
class LatticeTester::Lacunary< BasInt >

This class represents a set of indices with lacunary values.

This class stores the values of those indices as a vector, and they can be accessed via the [] operator. There also is a method to construct a set with values spaced in a certain way. This class is present here to be used with the subclasses of IntLattice.

Remarks
As it is, this class could be replaced by a simple vector when it occurs. It does not implement any feature that a basic vector class does not have. This class was part of the legacy code base but removing the instances where it is used would take more time than we are currently willing to spend on this library.

Constructor & Destructor Documentation

◆ Lacunary() [1/2]

template<typename BasInt >
LatticeTester::Lacunary< BasInt >::Lacunary ( const BasIntVec C,
int  t 
)
inline

Constructor for a set of \(t\) indices given in the vector C.

◆ Lacunary() [2/2]

template<typename BasInt >
LatticeTester::Lacunary< BasInt >::Lacunary ( int  t = 0)
inlineexplicit

Constructor for an empty set of \(t\) lacunary indices.

This constructor set the value of the indices to 0. To set indices, one should use either one [] or getLac, or the calcIndicesStreams() method.

◆ ~Lacunary()

template<typename BasInt >
LatticeTester::Lacunary< BasInt >::~Lacunary ( )
inline

Destructor.

Member Function Documentation

◆ calcIndicesStreams()

template<typename BasInt >
bool LatticeTester::Lacunary< BasInt >::calcIndicesStreams ( int  s,
int  w,
int  maxDim 
)

Fills the values of this object with maxDim indices starting from 0 by groups of \(s\), spaced apart by \(2^w\).

If \(w=0\), this is the case of non-lacunary indices. Returns true in the lacunary case, and false otherwise.

◆ getLac()

template<typename BasInt >
BasInt& LatticeTester::Lacunary< BasInt >::getLac ( int  i)
inline

Calling the object.getLac(i) gives the same result than calling object[i].

◆ getSize()

template<typename BasInt >
int LatticeTester::Lacunary< BasInt >::getSize ( ) const
inline

Returns the size of the set, that is the number of elements in the vector of indices.

◆ operator[]()

template<typename BasInt >
BasInt& LatticeTester::Lacunary< BasInt >::operator[] ( int  i)
inline

Returns a reference to the value of m_lac[i].

(m_lac is the underlying vector storing the set of indices.)

◆ toString()

template<typename BasInt >
std::string LatticeTester::Lacunary< BasInt >::toString ( ) const

Returns a string that describes this object.

This string will contain the dimension and all the indices stored.


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