OpenMD  2.5
Molecular Dynamics in the Open
OpenMD::MatrixAccumulator Class Reference

#include <Accumulator.hpp>

Inheritance diagram for OpenMD::MatrixAccumulator:
OpenMD::BaseAccumulator

Public Member Functions

 MatrixAccumulator ()
 
void add (ElementType const &val)
 
void clear ()
 
void getLastValue (ElementType &ret)
 
void getAverage (ResultType &ret)
 
void getVariance (ResultType &ret)
 
void getStdDev (ResultType &ret)
 
void get95percentConfidenceInterval (ResultType &ret)
 
- Public Member Functions inherited from OpenMD::BaseAccumulator
virtual size_t count ()
 
virtual ~BaseAccumulator ()
 

Private Types

typedef Mat3x3d ElementType
 
typedef Mat3x3d ResultType
 

Private Attributes

ElementType Val_
 
ResultType Avg_
 
ResultType Avg2_
 

Additional Inherited Members

- Protected Attributes inherited from OpenMD::BaseAccumulator
size_t Count_
 

Detailed Description

Definition at line 568 of file Accumulator.hpp.

Member Typedef Documentation

◆ ElementType

Definition at line 570 of file Accumulator.hpp.

◆ ResultType

Definition at line 571 of file Accumulator.hpp.

Constructor & Destructor Documentation

◆ MatrixAccumulator()

OpenMD::MatrixAccumulator::MatrixAccumulator ( )
inline

Definition at line 574 of file Accumulator.hpp.

References OpenMD::BaseAccumulator::clear().

Member Function Documentation

◆ add()

void OpenMD::MatrixAccumulator::add ( ElementType const &  val)
inline

Accumulate another value

Definition at line 581 of file Accumulator.hpp.

References OpenMD::BaseAccumulator::Count_.

◆ clear()

void OpenMD::MatrixAccumulator::clear ( void  )
inlinevirtual

reset the Accumulator to the empty state

Implements OpenMD::BaseAccumulator.

Definition at line 595 of file Accumulator.hpp.

References OpenMD::BaseAccumulator::Count_.

◆ get95percentConfidenceInterval()

void OpenMD::MatrixAccumulator::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 657 of file Accumulator.hpp.

References OpenMD::BaseAccumulator::Count_.

◆ getAverage()

void OpenMD::MatrixAccumulator::getAverage ( ResultType ret)
inline

compute the Mean

Definition at line 613 of file Accumulator.hpp.

References OpenMD::BaseAccumulator::Count_.

◆ getLastValue()

void OpenMD::MatrixAccumulator::getLastValue ( ElementType ret)
inline

return the most recently added value

Definition at line 605 of file Accumulator.hpp.

◆ getStdDev()

void OpenMD::MatrixAccumulator::getStdDev ( ResultType ret)
inline

compute error of average value

Definition at line 636 of file Accumulator.hpp.

References OpenMD::BaseAccumulator::Count_.

◆ getVariance()

void OpenMD::MatrixAccumulator::getVariance ( ResultType ret)
inline

compute the Variance

Definition at line 622 of file Accumulator.hpp.

References OpenMD::BaseAccumulator::Count_.

Member Data Documentation

◆ Avg2_

ResultType OpenMD::MatrixAccumulator::Avg2_
private

Definition at line 672 of file Accumulator.hpp.

◆ Avg_

ResultType OpenMD::MatrixAccumulator::Avg_
private

Definition at line 671 of file Accumulator.hpp.

◆ Val_

ElementType OpenMD::MatrixAccumulator::Val_
private

Definition at line 670 of file Accumulator.hpp.


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