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