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

Accumulator class. More...

#include <Accumulator.h>

Public Member Functions

 Accumulator (Real initialValue, Real normType)
 Constructor. More...
 
 Accumulator (Accumulator &)=default
 Default copy constructor.
 
 Accumulator (Accumulator &&)=default
 Default move constructor.
 
void accumulate (Real weight, Real value, Real power)
 Accumulate a new merit value value with weight weight. More...
 
Real tryAccumulate (Real weight, Real value, Real power) const
 Returns the value which would be held by the accumulator if a new merit value value with weight weight were accumulated. More...
 
void set (Real value)
 Set the current merit value held by the accumulator to value.
 
Real value () const
 Returns the current merit value held by the accumulator.
 

Detailed Description

Accumulator class.

Used by figures of merit to aggregate partial merit values (dimension, projection-dependent, etc.).

Constructor & Destructor Documentation

◆ Accumulator()

NetBuilder::Accumulator::Accumulator ( Real  initialValue,
Real  normType 
)

Constructor.

Parameters
initialValueInitial value of the accumulator.
normTypeNorm type of the accumulator. A finite real corresponds to the q-norm whereas the infinite corresponds to the sup norm.

Member Function Documentation

◆ accumulate()

void NetBuilder::Accumulator::accumulate ( Real  weight,
Real  value,
Real  power 
)

Accumulate a new merit value value with weight weight.

The accumulator raises value to power power.

Parameters
weightWeight of the value.
valueValue to accumulate.
powerPower used when raising value.

◆ tryAccumulate()

Real NetBuilder::Accumulator::tryAccumulate ( Real  weight,
Real  value,
Real  power 
) const

Returns the value which would be held by the accumulator if a new merit value value with weight weight were accumulated.

The accumulator raises value to power power.

Parameters
weightWeight of the value.
valueValue to accumulate.
powerPower used when raising value.

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