Lattice Builder
Software Package for Constructing Rank-1 Lattices
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Groups Pages
LatBuilder::Accumulator< OP, VAL > Class Template Reference

Accumulator template. More...

#include <Accumulator.h>

Public Member Functions

 Accumulator (VAL initialValue)
 
void accumulate (const VAL &value)
 Feeds a new value to the accumulator.
 
void accumulate (Real weight, const VAL &value, Real power=1.0)
 Feeds value multiplied by weight to the accumulator. More...
 
const VAL & value () const
 Returns the current value of the accumulator.
 
VAL & value ()
 

Static Public Member Functions

static std::string name ()
 Returns the name of the operator implemented by the accumulator.
 

Detailed Description

template<template< typename > class OP, typename VAL>
class LatBuilder::Accumulator< OP, VAL >

Accumulator template.

Template Parameters
OPScalar binary operator. For example, Functor::Sum or Functor::Max.

Member Function Documentation

template<template< typename > class OP, typename VAL>
void LatBuilder::Accumulator< OP, VAL >::accumulate ( Real  weight,
const VAL &  value,
Real  power = 1.0 
)
inline

Feeds value multiplied by weight to the accumulator.

weight is assumed to already be raised at the power power.

References LatBuilder::Accumulator< OP, VAL >::value().


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