Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

50 lines
554 B

/*++
Copyright (c) 1998 Microsoft Corporation
Module Name:
decayacc.h
Abstract:
SIS Groveler decaying accumulator include file
Authors:
John Douceur, 1998
Environment:
User Mode
Revision History:
--*/
#ifndef _INC_DECAYACC
#define _INC_DECAYACC
class DecayingAccumulator
{
public:
DecayingAccumulator(
unsigned int time_constant);
void increment(
int increase = 1);
double retrieve_value() const;
private:
double time_constant;
double decaying_accumulation;
unsigned int update_time;
};
#endif /* _INC_DECAYACC */