Unity Scopes API
unity::scopes::testing::Sample Class Referenceabstract

The Sample class models the interface to a sample of raw observations and their statistical properties. More...

#include <unity/scopes/testing/Statistics.h>

Inheritance diagram for unity::scopes::testing::Sample:

Public Types

typedef std::size_t SizeType
 
typedef double ValueType
 
typedef std::function< void(ValueType)> Enumerator
 

Public Member Functions

virtual SizeType get_size () const =0
 
virtual ValueType get_mean () const =0
 
virtual ValueType get_variance () const =0
 
virtual void enumerate (const Enumerator &enumerator) const =0
 

Detailed Description

The Sample class models the interface to a sample of raw observations and their statistical properties.

Member Typedef Documentation

◆ Enumerator

Function signature for enumerating all raw observations.

◆ SizeType

Unsigned type describing the size of the sample.

◆ ValueType

Floating point type describing an individual observation.

Member Function Documentation

◆ enumerate()

virtual void unity::scopes::testing::Sample::enumerate ( const Enumerator enumerator) const
pure virtual

Enumerate all raw observations from the sample.

Implemented in unity::scopes::testing::Benchmark::Result::Timing.

◆ get_mean()

virtual ValueType unity::scopes::testing::Sample::get_mean ( ) const
pure virtual

Query the empirical mean of the sample.

Implemented in unity::scopes::testing::Benchmark::Result::Timing.

◆ get_size()

virtual SizeType unity::scopes::testing::Sample::get_size ( ) const
pure virtual

Query the size of the sample.

Implemented in unity::scopes::testing::Benchmark::Result::Timing.

◆ get_variance()

virtual ValueType unity::scopes::testing::Sample::get_variance ( ) const
pure virtual

Query the empirical variance of the sample.

Implemented in unity::scopes::testing::Benchmark::Result::Timing.


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