/*
 * Author:
 *         Kendy Kutzner <kutzner@ira.uka.de>
 *
 * (c) 2005 Research Group Dr. Fuhrmann, University of Karlsruhe, Germany
 * All rights reserved.
 *
 * $Id: statistic.h,v 1.3 2005/11/21 10:46:57 kutzner Exp $
 *
 */

#ifndef _STATISTIC_H_
#define _STATISTIC_H_

class stat_counter {
	public:
		stat_counter(){_counter=0;};
		void inc(){_counter++;};
		void add(int i){_counter+=i;};
		long int get(){return _counter;};
	private:
		long int _counter;
};

class stat_average {
	public:
		stat_average(){_sum=0; _count=0;}
		void add(double d){_sum+=d; _count++;}
		double get(){return _sum/_count;}
	private:
		long int _count;
		double _sum;
};



#endif // _STATISTIC_H_
