herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
ExSample::SimpleCellGrid::Counter Struct Reference

A simple counter to store information used for adaption. More...

#include <SimpleCellGrid.h>

Public Member Functions

 Counter ()
 Default constructor.
 
void book (double weight)
 Book a point.
 
double averageWeight () const
 Return the average weight.
 
double varianceOfAverage () const
 Return the variance of the weights.
 

Public Attributes

double nPoints
 The number of points.
 
double sumOfWeights
 The sum of weights.
 
double sumOfSquaredWeights
 The sum of squared weights.
 
double maxWeight
 The maximum weight.
 

Detailed Description

A simple counter to store information used for adaption.

Definition at line 97 of file SimpleCellGrid.h.

Constructor & Destructor Documentation

◆ Counter()

ExSample::SimpleCellGrid::Counter::Counter ( )
inline

Default constructor.

Definition at line 102 of file SimpleCellGrid.h.

Member Function Documentation

◆ averageWeight()

double ExSample::SimpleCellGrid::Counter::averageWeight ( ) const
inline

Return the average weight.

Definition at line 140 of file SimpleCellGrid.h.

References nPoints, and sumOfWeights.

◆ book()

void ExSample::SimpleCellGrid::Counter::book ( double  weight)
inline

Book a point.

Definition at line 130 of file SimpleCellGrid.h.

References maxWeight, nPoints, sqr(), sumOfSquaredWeights, sumOfWeights, and ExSample::CellGrid::weight().

◆ varianceOfAverage()

double ExSample::SimpleCellGrid::Counter::varianceOfAverage ( ) const
inline

Return the variance of the weights.

Definition at line 145 of file SimpleCellGrid.h.

References nPoints, sqr(), sumOfSquaredWeights, and sumOfWeights.

Member Data Documentation

◆ maxWeight

double ExSample::SimpleCellGrid::Counter::maxWeight

The maximum weight.

Definition at line 125 of file SimpleCellGrid.h.

Referenced by book().

◆ nPoints

double ExSample::SimpleCellGrid::Counter::nPoints

The number of points.

Definition at line 110 of file SimpleCellGrid.h.

Referenced by averageWeight(), book(), and varianceOfAverage().

◆ sumOfSquaredWeights

double ExSample::SimpleCellGrid::Counter::sumOfSquaredWeights

The sum of squared weights.

Definition at line 120 of file SimpleCellGrid.h.

Referenced by book(), and varianceOfAverage().

◆ sumOfWeights

double ExSample::SimpleCellGrid::Counter::sumOfWeights

The sum of weights.

Definition at line 115 of file SimpleCellGrid.h.

Referenced by averageWeight(), book(), and varianceOfAverage().


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