SERunningAverage.h
1/* Distributed under the Apache License, Version 2.0.
2 See accompanying NOTICE file for details.*/
3
4#pragma once
5#include "cdm/properties/SEProperty.h"
6
7class CDM_DECL SERunningAverage : public SEProperty
8{
9 friend class PBProperty;//friend the serialization class
10public:
11
13 virtual ~SERunningAverage();
14
15 void Invalidate() override;
16 bool IsValid() const override;
17
19 double Sample(double d);
21 double Value();
22
23 unsigned int NumSamples() { return m_NumSamples; }
24
25protected:
26
27 double m_Sum;
28 unsigned int m_NumSamples;
29};
Definition: PBProperties.h:87
Definition: SEProperty.h:8
virtual void Invalidate()=0
virtual bool IsValid() const =0
Definition: SERunningAverage.h:8
unsigned int NumSamples()
Definition: SERunningAverage.h:23
unsigned int m_NumSamples
Definition: SERunningAverage.h:28
double m_Sum
Definition: SERunningAverage.h:27

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.