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

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. decayacc.h
  5. Abstract:
  6. SIS Groveler decaying accumulator include file
  7. Authors:
  8. John Douceur, 1998
  9. Environment:
  10. User Mode
  11. Revision History:
  12. --*/
  13. #ifndef _INC_DECAYACC
  14. #define _INC_DECAYACC
  15. class DecayingAccumulator
  16. {
  17. public:
  18. DecayingAccumulator(
  19. unsigned int time_constant);
  20. void increment(
  21. int increase = 1);
  22. double retrieve_value() const;
  23. private:
  24. double time_constant;
  25. double decaying_accumulation;
  26. unsigned int update_time;
  27. };
  28. #endif /* _INC_DECAYACC */