OpenMD 3.1
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
OpenMD::Accumulator Class Reference

Basic Accumulator class for numbers. More...

#include <OldAccumulator.hpp>

+ Inheritance diagram for OpenMD::Accumulator:

Public Member Functions

virtual void add (ElementType const &val)
 Accumulate another value.
 
void clear ()
 reset the Accumulator to the empty state
 
void getLastValue (ElementType &ret)
 return the most recently added value
 
void getAverage (ResultType &ret)
 compute the Mean
 
void getTotal (ResultType &ret)
 return the Total accumulated sum
 
void getVariance (ResultType &ret)
 compute the Variance
 
void getStdDev (ResultType &ret)
 compute error of average value
 
void getMax (ElementType &ret)
 return the largest value
 
void getMin (ElementType &ret)
 return the smallest value
 
void get95percentConfidenceInterval (ResultType &ret)
 return the 95% confidence interval:
 
- Public Member Functions inherited from OpenMD::BaseAccumulator
virtual size_t count ()
 get the number of accumulated values
 

Additional Inherited Members

- Protected Attributes inherited from OpenMD::BaseAccumulator
size_t Count_ {}
 

Detailed Description

Basic Accumulator class for numbers.

Definition at line 71 of file OldAccumulator.hpp.

Constructor & Destructor Documentation

◆ Accumulator()

OpenMD::Accumulator::Accumulator ( )
inline

Definition at line 76 of file OldAccumulator.hpp.

◆ ~Accumulator()

OpenMD::Accumulator::~Accumulator ( )
inline

Definition at line 78 of file OldAccumulator.hpp.

Member Function Documentation

◆ add()

virtual void OpenMD::Accumulator::add ( ElementType const & val)
inlinevirtual

Accumulate another value.

Definition at line 83 of file OldAccumulator.hpp.

Referenced by OpenMD::PotDiff::process().

◆ clear()

void OpenMD::Accumulator::clear ( )
inlinevirtual

reset the Accumulator to the empty state

Implements OpenMD::BaseAccumulator.

Definition at line 101 of file OldAccumulator.hpp.

◆ get95percentConfidenceInterval()

void OpenMD::Accumulator::get95percentConfidenceInterval ( ResultType & ret)
inline

return the 95% confidence interval:

That is returns c, such that we have 95% confidence that the true mean is within 2c of the Average (x):

x - c <= true mean <= x + c

Definition at line 183 of file OldAccumulator.hpp.

References getStdDev().

◆ getAverage()

void OpenMD::Accumulator::getAverage ( ResultType & ret)
inline

compute the Mean

Definition at line 120 of file OldAccumulator.hpp.

◆ getLastValue()

void OpenMD::Accumulator::getLastValue ( ElementType & ret)
inline

return the most recently added value

Definition at line 112 of file OldAccumulator.hpp.

◆ getMax()

void OpenMD::Accumulator::getMax ( ElementType & ret)
inline

return the largest value

Definition at line 159 of file OldAccumulator.hpp.

◆ getMin()

void OpenMD::Accumulator::getMin ( ElementType & ret)
inline

return the smallest value

Definition at line 168 of file OldAccumulator.hpp.

◆ getStdDev()

void OpenMD::Accumulator::getStdDev ( ResultType & ret)
inline

compute error of average value

Definition at line 148 of file OldAccumulator.hpp.

References getVariance().

Referenced by get95percentConfidenceInterval().

◆ getTotal()

void OpenMD::Accumulator::getTotal ( ResultType & ret)
inline

return the Total accumulated sum

Definition at line 129 of file OldAccumulator.hpp.

◆ getVariance()

void OpenMD::Accumulator::getVariance ( ResultType & ret)
inline

compute the Variance

Definition at line 138 of file OldAccumulator.hpp.

Referenced by getStdDev().


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