23 */ |
23 */ |
24 |
24 |
25 #ifndef SHARE_VM_UTILITIES_NUMBERSEQ_HPP |
25 #ifndef SHARE_VM_UTILITIES_NUMBERSEQ_HPP |
26 #define SHARE_VM_UTILITIES_NUMBERSEQ_HPP |
26 #define SHARE_VM_UTILITIES_NUMBERSEQ_HPP |
27 |
27 |
|
28 #include "memory/allocation.hpp" |
|
29 |
28 /** |
30 /** |
29 ** This file contains a few classes that represent number sequence, |
31 ** This file contains a few classes that represent number sequence, |
30 ** x1, x2, x3, ..., xN, and can calculate their avg, max, and sd. |
32 ** x1, x2, x3, ..., xN, and can calculate their avg, max, and sd. |
31 ** |
33 ** |
32 ** Here's a quick description of the classes: |
34 ** Here's a quick description of the classes: |
38 ** of the sequence and calculates avg, max, and sd only over them |
40 ** of the sequence and calculates avg, max, and sd only over them |
39 **/ |
41 **/ |
40 |
42 |
41 #define DEFAULT_ALPHA_VALUE 0.7 |
43 #define DEFAULT_ALPHA_VALUE 0.7 |
42 |
44 |
43 class AbsSeq { |
45 class AbsSeq: public CHeapObj<mtInternal> { |
44 private: |
46 private: |
45 void init(double alpha); |
47 void init(double alpha); |
46 |
48 |
47 protected: |
49 protected: |
48 int _num; // the number of elements in the sequence |
50 int _num; // the number of elements in the sequence |