unity.scopes.testing.Sample

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: src="https://assets.ubuntu.com/v1/2bc2cbc5-classunity_1_1scopes_1_1testing_1_1_sample__inherit__graph.png" border="0" alt="Inheritance graph"/>

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

typedef std::function<void(ValueType)> unity::scopes::testing::Sample::Enumerator

Function signature for enumerating all raw observations.

typedef std::size_t unity::scopes::testing::Sample::SizeType

Unsigned type describing the size of the sample.

typedef double unity::scopes::testing::Sample::ValueType

Floating point type describing an individual observation.

Member Function Documentation

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.

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.

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.

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.