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

#include <Accumulator.hpp>

Inheritance diagram for OpenMD::VectorAccumulator:
OpenMD::BaseAccumulator

Public Member Functions

 VectorAccumulator ()
 
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)
 
void getMaxLength (RealType &ret)
 
void getMinLength (RealType &ret)
 
void getAverageLength (RealType &ret)
 
void getLengthVariance (RealType &ret)
 
void getLengthStdDev (RealType &ret)
 
void getLength95percentConfidenceInterval (ResultType &ret)
 
- Public Member Functions inherited from OpenMD::BaseAccumulator
virtual size_t count ()
 
virtual ~BaseAccumulator ()
 

Private Types

typedef Vector3d ElementType
 
typedef Vector3d ResultType
 

Private Attributes

ResultType Val_
 
ResultType Avg_
 
ResultType Avg2_
 
RealType AvgLen_
 
RealType AvgLen2_
 
RealType Min_
 
RealType Max_
 

Additional Inherited Members

- Protected Attributes inherited from OpenMD::BaseAccumulator
size_t Count_
 

Detailed Description

Definition at line 196 of file Accumulator.hpp.

Member Typedef Documentation

◆ ElementType

Definition at line 198 of file Accumulator.hpp.

◆ ResultType

Definition at line 199 of file Accumulator.hpp.

Constructor & Destructor Documentation

◆ VectorAccumulator()

OpenMD::VectorAccumulator::VectorAccumulator ( )
inline

Definition at line 202 of file Accumulator.hpp.

References OpenMD::BaseAccumulator::clear().

Member Function Documentation

◆ add()

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

Accumulate another value

Definition at line 209 of file Accumulator.hpp.

References OpenMD::BaseAccumulator::Count_.

◆ clear()

void OpenMD::VectorAccumulator::clear ( void  )
inlinevirtual

reset the Accumulator to the empty state

Implements OpenMD::BaseAccumulator.

Definition at line 234 of file Accumulator.hpp.

References OpenMD::BaseAccumulator::Count_, and OpenMD::V3Zero.

◆ get95percentConfidenceInterval()

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

References OpenMD::BaseAccumulator::Count_.

◆ getAverage()

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

compute the Mean

Definition at line 254 of file Accumulator.hpp.

References OpenMD::BaseAccumulator::Count_.

◆ getAverageLength()

void OpenMD::VectorAccumulator::getAverageLength ( RealType &  ret)
inline

return the largest length

Definition at line 325 of file Accumulator.hpp.

References OpenMD::BaseAccumulator::Count_.

◆ getLastValue()

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

return the most recently added value

Definition at line 246 of file Accumulator.hpp.

◆ getLength95percentConfidenceInterval()

void OpenMD::VectorAccumulator::getLength95percentConfidenceInterval ( 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 361 of file Accumulator.hpp.

References OpenMD::BaseAccumulator::Count_.

◆ getLengthStdDev()

void OpenMD::VectorAccumulator::getLengthStdDev ( RealType &  ret)
inline

compute error of average value

Definition at line 344 of file Accumulator.hpp.

References OpenMD::BaseAccumulator::Count_.

◆ getLengthVariance()

void OpenMD::VectorAccumulator::getLengthVariance ( RealType &  ret)
inline

compute the Variance of the length

Definition at line 334 of file Accumulator.hpp.

References OpenMD::BaseAccumulator::Count_.

◆ getMaxLength()

void OpenMD::VectorAccumulator::getMaxLength ( RealType &  ret)
inline

return the largest length

Definition at line 307 of file Accumulator.hpp.

References OpenMD::BaseAccumulator::Count_.

◆ getMinLength()

void OpenMD::VectorAccumulator::getMinLength ( RealType &  ret)
inline

return the smallest length

Definition at line 316 of file Accumulator.hpp.

References OpenMD::BaseAccumulator::Count_.

◆ getStdDev()

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

compute error of average value

Definition at line 275 of file Accumulator.hpp.

References OpenMD::BaseAccumulator::Count_.

◆ getVariance()

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

compute the Variance

Definition at line 263 of file Accumulator.hpp.

References OpenMD::BaseAccumulator::Count_.

Member Data Documentation

◆ Avg2_

ResultType OpenMD::VectorAccumulator::Avg2_
private

Definition at line 373 of file Accumulator.hpp.

◆ Avg_

ResultType OpenMD::VectorAccumulator::Avg_
private

Definition at line 372 of file Accumulator.hpp.

◆ AvgLen2_

RealType OpenMD::VectorAccumulator::AvgLen2_
private

Definition at line 375 of file Accumulator.hpp.

◆ AvgLen_

RealType OpenMD::VectorAccumulator::AvgLen_
private

Definition at line 374 of file Accumulator.hpp.

◆ Max_

RealType OpenMD::VectorAccumulator::Max_
private

Definition at line 377 of file Accumulator.hpp.

◆ Min_

RealType OpenMD::VectorAccumulator::Min_
private

Definition at line 376 of file Accumulator.hpp.

◆ Val_

ResultType OpenMD::VectorAccumulator::Val_
private

Definition at line 371 of file Accumulator.hpp.


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