herald  2.0.0
Public Member Functions | List of all members
herald::datatype::Distribution Class Reference

#include <distribution.h>

Public Member Functions

 Distribution () noexcept
 Initialise an empty distribution.
 
 Distribution (double x, std::size_t frequency) noexcept
 Initialise a distribution with frequency occurences of value x.
 
 ~Distribution () noexcept=default
 Destroy a distribution.
 
void add (double x) noexcept
 Add a single occurence of a value.
 
void add (double x, std::size_t frequency) noexcept
 Add multiple occurences of a value.
 
void add (const Distribution &other) noexcept
 Add another distribution to this value.
 
const std::size_t count () const noexcept
 return the count
 
const double mean () const noexcept
 return the mean
 
const double variance () const noexcept
 return the variance
 
const double standardDeviation () const noexcept
 Return the standard deviation.
 
const double min () const noexcept
 Return the minimum recorded value.
 
const double max () const noexcept
 Return the maximum recorded value.
 
 operator std::string () const noexcept
 Convert this distribution to a string.
 
void reset () noexcept
 Reset this instance to its initial state.
 

Detailed Description

/brief Simple distance value in metres Has to be a class/struct type to allow template resolution


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