LatNet Builder Manual 2.1.3-6
Software Package for Constructing Highly Uniform Point Sets
Loading...
Searching...
No Matches
LatBuilder::Parser::Weights Struct Reference

Parser for weights. More...

#include <Weights.h>

Static Public Member Functions

static std::unique_ptr< LatticeTester::WeightsparseProjectionDependent (const std::string &arg, Real powerScale)
 Parses a string specifying projection-dependent weights.
static std::unique_ptr< LatticeTester::WeightsparseOrderDependent (const std::string &arg, Real powerScale)
 Parses a string specifying order-dependent weights.
static std::unique_ptr< LatticeTester::WeightsparseProduct (const std::string &arg, Real powerScale)
 Parses a string specifying product weights.
static std::unique_ptr< LatticeTester::WeightsparsePOD (const std::string &arg, Real powerScale)
 Parses a string specifying product and order-dependent (POD) weights.
static std::unique_ptr< LatticeTester::Weightsparse (const std::string &arg, Real powerScale=1.0)
 Parses a string specifying weights.

Detailed Description

Parser for weights.

Member Function Documentation

◆ parse()

std::unique_ptr< LatticeTester::Weights > LatBuilder::Parser::Weights::parse ( const std::string & arg,
Real powerScale = 1.0 )
static

Parses a string specifying weights.

Parameters
argInput string to be parsed as weights.
powerScalePower to which each number parsed from input will be raised before being assigned to a weight. This is useful to parse weights for a figure of merit defined as a \(q\)-norm with respect to the different projections, e.g., in the WeightedFigureOfMerit::WeightedFigureOfMerit constructor, the weights are assumed to be already raised to the power \(q\).

For example strings, see parseProjectionDependent(), parseOrderDependent() and parseProduct().

Returns
A pointer to a newly created object or nullptr on failure.
Examples
quantiles.cc.

◆ parseOrderDependent()

std::unique_ptr< LatticeTester::Weights > LatBuilder::Parser::Weights::parseOrderDependent ( const std::string & arg,
Real powerScale )
static

Parses a string specifying order-dependent weights.

Parameters
argInput string to be parsed as weights.
powerScalePower to which each number parsed from input will be raised before being assigned to a weight.

Example strings: order-dependent:0.1, order-dependent:0.1:1.0,0.7,0.3

Returns
A pointer to a newly created object or nullptr on failure.

◆ parsePOD()

std::unique_ptr< LatticeTester::Weights > LatBuilder::Parser::Weights::parsePOD ( const std::string & arg,
Real powerScale )
static

Parses a string specifying product and order-dependent (POD) weights.

The string must have the following form: POD:<default-Gamma>:<Gamma_1>,<Gamma_2>,...:<default-gamma>:<gamma_1>,...

Example strings: POD:1.0::0.1, POD:1.0:1.0,0.7,0.3:0.1:0.9,0.8,0.7

Returns
A pointer to a newly created object or nullptr on failure.

◆ parseProduct()

std::unique_ptr< LatticeTester::Weights > LatBuilder::Parser::Weights::parseProduct ( const std::string & arg,
Real powerScale )
static

Parses a string specifying product weights.

Parameters
argInput string to be parsed as weights.
powerScalePower to which each number parsed from input will be raised before being assigned to a weight.

Example strings: product:0.1, product:0.1:1.0,0.7,0.3

Returns
A pointer to a newly created object or nullptr on failure.

◆ parseProjectionDependent()

std::unique_ptr< LatticeTester::Weights > LatBuilder::Parser::Weights::parseProjectionDependent ( const std::string & arg,
Real powerScale )
static

Parses a string specifying projection-dependent weights.

Parameters
argInput string to be parsed as weights.
powerScalePower to which each number parsed from input will be raised before being assigned to a weight.

Example strings: projection-dependent:1,2:1.0, projection-dependent:1,2:1.0:1,2,3:0.3

Returns
A pointer to a newly created object or nullptr on failure.

The documentation for this struct was generated from the following file:
  • include/latbuilder/Parser/Weights.h