Lattice Tester Online Documentation 0.1.0-861
Software Package For Testing The Uniformity Of Integral Lattices In The Real Space
Loading...
Searching...
No Matches
LatticeTester::WeightsProjectionDependent Class Reference

Defines projection-dependent weights. More...

#include <latticetester/WeightsProjectionDependent.h>

+ Inheritance diagram for LatticeTester::WeightsProjectionDependent:

Public Member Functions

 WeightsProjectionDependent ()
 Constructs projection-dependent weights.
 
 WeightsProjectionDependent (const WeightsProjectionDependent &)
 Copy constructor.
 
virtual ~WeightsProjectionDependent ()
 Destructor.
 
virtual Weight getWeight (const Coordinates &projection) const
 Returns the weight of the projection specified by projection.
 
virtual uint64_t getSize () const
 Returns the number of weights.
 
virtual const WeightsMapgetWeightsForLargestIndex (Coordinates::value_type largestIndex) const
 Returns a map of weights for all projections whose largest index is largestIndex.
 
virtual void setWeight (const Coordinates &projection, Weight weight)
 Static factory method; create a WeightsProjectionDependent object by parsing XML data.
 
- Public Member Functions inherited from LatticeTester::Weights
virtual ~Weights ()
 Destructor.
 
virtual uint64_t interlacingFactor () const
 Returns the interlacing factor of the weights.
 

Protected Types

typedef std::map< Coordinates, WeightWeightsMap
 

Protected Member Functions

virtual void format (std::ostream &os) const
 Identifies the type of weights, formats them and outputs them on os.
 
- Protected Member Functions inherited from LatticeTester::Weights

Protected Attributes

std::vector< WeightsMapm_weights
 Per-projection weights, regrouped by largest coordinate index.
 

Static Protected Attributes

static const WeightsMap m_emptyWeights
 Used only to return an empty map.
 

Friends

std::istream & operator>> (std::istream &is, WeightsProjectionDependent &weights)
 

Related Symbols

(Note that these are not member symbols.)

std::istream & operator>> (std::istream &is, WeightsProjectionDependent &weights)
 Reads formatted projection-dependent weights into the object weights.
 

Detailed Description

Defines projection-dependent weights.

The weight for any given projection can be set with setWeight(). Internally, the weights are regrouped by largest coordinate index in different std::map objects. This is useful for use with CBC constructions.

Member Typedef Documentation

◆ WeightsMap

Constructor & Destructor Documentation

◆ WeightsProjectionDependent() [1/2]

LatticeTester::WeightsProjectionDependent::WeightsProjectionDependent ( )

Constructs projection-dependent weights.

◆ WeightsProjectionDependent() [2/2]

LatticeTester::WeightsProjectionDependent::WeightsProjectionDependent ( const WeightsProjectionDependent & o)

Copy constructor.

◆ ~WeightsProjectionDependent()

virtual LatticeTester::WeightsProjectionDependent::~WeightsProjectionDependent ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ format()

void LatticeTester::WeightsProjectionDependent::format ( std::ostream & os) const
protectedvirtual

Identifies the type of weights, formats them and outputs them on os.

Subclasses that implement Weights should identify themselves in the output.

Implements LatticeTester::Weights.

◆ getSize()

virtual uint64_t LatticeTester::WeightsProjectionDependent::getSize ( ) const
inlinevirtual

Returns the number of weights.

◆ getWeight()

Weight LatticeTester::WeightsProjectionDependent::getWeight ( const Coordinates & projection) const
virtual

Returns the weight of the projection specified by projection.

Implements LatticeTester::Weights.

◆ getWeightsForLargestIndex()

const WeightsProjectionDependent::WeightsMap & LatticeTester::WeightsProjectionDependent::getWeightsForLargestIndex ( Coordinates::value_type largestIndex) const
virtual

Returns a map of weights for all projections whose largest index is largestIndex.

◆ setWeight()

void LatticeTester::WeightsProjectionDependent::setWeight ( const Coordinates & projection,
Weight weight )
virtual

Static factory method; create a WeightsProjectionDependent object by parsing XML data.

Sets the weight of the projection specified by projection.

Friends And Related Symbol Documentation

◆ operator>> [1/2]

std::istream & operator>> ( std::istream & is,
WeightsProjectionDependent & weights )
friend

◆ operator>>() [2/2]

std::istream & operator>> ( std::istream & is,
WeightsProjectionDependent & weights )
related

Reads formatted projection-dependent weights into the object weights.

The input should be a sequence of projection-to-weight mappings, of the format:

<match1>: <weight1>, <match2>: <weight2>, ...

where <weightn> is the weight (a floating point number) associated to the projection-match <matchn>, and <matchn> is one of:

  • a set of coordinates, as specified in operator>>(std::istream&, LatticeTester::Coordinates&) to explicitly set the weight for the projection that correspond to these coordinates;
  • the string order m to implicitly set the weights of projections of order m;
  • the string default to set the default weight for other projections.
Remarks
Comments can be appended to any line after a # character.
The match-weight pairs can be separated by commas and/or whitespace (including newlines).
The colons (:) can be replaced with => or ->.
See also
operator>>(std::istream&, LatticeTester::Coordinates&)

Member Data Documentation

◆ m_emptyWeights

const WeightsProjectionDependent::WeightsMap LatticeTester::WeightsProjectionDependent::m_emptyWeights
staticprotected

Used only to return an empty map.

◆ m_weights

std::vector<WeightsMap> LatticeTester::WeightsProjectionDependent::m_weights
protected

Per-projection weights, regrouped by largest coordinate index.


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