LatNet Builder Manual  2.0.1-11
Software Package for Constructing Highly Uniform Point Sets
LatticeTester::ProjectionDependentWeights Class Reference

Projection-dependent weights. More...

#include <ProjectionDependentWeights.h>

Inherits LatticeTester::Weights.

Inherited by LatBuilder::Interlaced::IPDWeights< KERNEL >.

Public Member Functions

 ProjectionDependentWeights ()
 Constructs projection-dependent weights.
 
virtual ~ProjectionDependentWeights ()
 Destructor.
 
 ProjectionDependentWeights (const ProjectionDependentWeights &)
 Copy constructor.
 
virtual Weight getWeight (const Coordinates &projection) const
 Returns the weight of the projection specified by projection.
 
virtual unsigned int getSize () const
 
virtual const WeightsMap & getWeightsForLargestIndex (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)
 Sets the weight of the projection specified by projection.
 
- Public Member Functions inherited from LatticeTester::Weights
virtual ~Weights ()
 Destructor.
 
virtual unsigned int interlacingFactor () const
 Returns the interlacing factor of the weights. More...
 

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. More...
 

Protected Attributes

std::vector< WeightsMap > m_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 &, ProjectionDependentWeights &)
 

Related Functions

(Note that these are not member functions.)

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

Detailed Description

Projection-dependent weights.

The weight for a 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.

Member Function Documentation

◆ format()

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

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

Remarks
Deriving classes should identify themselves in the output.

Implements LatticeTester::Weights.

Reimplemented in LatBuilder::Interlaced::IPDWeights< KERNEL >.

Friends And Related Function Documentation

◆ operator>>()

std::istream & operator>> ( std::istream &  is,
ProjectionDependentWeights 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&)

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