-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhistogram.h
More file actions
40 lines (29 loc) · 899 Bytes
/
histogram.h
File metadata and controls
40 lines (29 loc) · 899 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#pragma once
#ifndef NS3_HISTOGRAM_H
#define NS3_HISTOGRAM_H
#include <vector>
#include <stdint.h>
#include <ostream>
namespace ns3 {
class Histogram
{
public:
// --- basic methods ---
Histogram(double binWidth);
Histogram();
// Methods for Getting the Histogram Results
uint32_t GetNBins() const;
double GetBinStart(uint32_t index);
double GetBinEnd(uint32_t index);
double GetBinWidth(uint32_t index) const;
void SetDefaultBinWidth(double binWidth);
uint32_t GetBinCount(uint32_t index);
// Method for adding values
void AddValue(double value);
void SerializeToXmlStream(std::ostream & os, int indent, std::string elementName) const;
private:
std::vector<uint32_t> m_histogram;
double m_binWidth;
};
} // namespace ns3
#endif /* NS3_HISTOGRAM_H */