]> git.mxchange.org Git - simgear.git/blobdiff - simgear/structure/SGSmplstat.hxx
Revert "Use simgear internal stuff for the singleton class."
[simgear.git] / simgear / structure / SGSmplstat.hxx
index 1d1e8d57e1c498bc6c9444134b5e86c3b0301b96..d8e29b3f3719b9c928a5ebed509b6e1ccf5cfaa1 100644 (file)
@@ -16,17 +16,13 @@ License along with this library; if not, write to the Free Software
 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 #ifndef SampleStatistic_h
-#ifdef __GNUG__
-#pragma interface
-#endif
+
 #define SampleStatistic_h 1
 
 
 #undef min
 #undef max
 
-using namespace std;
-
 class SampleStatistic
 {
 protected:
@@ -34,6 +30,7 @@ protected:
   double x;
   double x2;
   double minValue, maxValue;
+  double allTimeTotal;
 
 public:  SampleStatistic ();
   inline virtual ~ SampleStatistic ();
@@ -46,6 +43,7 @@ public:  SampleStatistic ();
   double var () const;
   double min () const;
   double max () const;
+  double total () const;
   double confidence (int p_percentage) const;
   double confidence (double p_value) const;
 
@@ -62,6 +60,7 @@ public:  SampleStatistic ();
 
 inline SampleStatistic::SampleStatistic ()
 {
+  allTimeTotal = 0;
   reset ();
 }
 inline int SampleStatistic::samples () const
@@ -76,6 +75,10 @@ inline double SampleStatistic::max () const
 {
   return (maxValue);
 }
+inline double SampleStatistic::total () const
+{
+  return (allTimeTotal);
+}
 
 inline SampleStatistic::~SampleStatistic ()
 {