A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
histogram.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
//
3
// Copyright (c) 2009 INESC Porto
4
//
5
// This program is free software; you can redistribute it and/or modify
6
// it under the terms of the GNU General Public License version 2 as
7
// published by the Free Software Foundation;
8
//
9
// This program is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with this program; if not, write to the Free Software
16
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
//
18
// Author: Pedro Fortuna <pedro.fortuna@inescporto.pt> <pedro.fortuna@gmail.com>
19
//
20
21
#ifndef NS3_HISTOGRAM_H
22
#define NS3_HISTOGRAM_H
23
24
#include <vector>
25
#include <stdint.h>
26
#include <ostream>
27
28
namespace
ns3 {
29
30
class
Histogram
31
{
32
public
:
33
34
// --- basic methods ---
35
Histogram
(
double
binWidth);
36
Histogram
();
37
38
// Methods for Getting the Histogram Results
39
uint32_t
GetNBins
()
const
;
40
double
GetBinStart
(uint32_t index);
41
double
GetBinEnd
(uint32_t index);
42
double
GetBinWidth
(uint32_t index)
const
;
43
void
SetDefaultBinWidth
(
double
binWidth);
44
uint32_t
GetBinCount
(uint32_t index);
45
46
// Method for adding values
47
void
AddValue
(
double
value);
48
49
50
void
SerializeToXmlStream
(std::ostream &os,
int
indent
, std::string elementName)
const
;
51
54
55
private
:
56
std::vector<uint32_t>
m_histogram
;
57
double
m_binWidth
;
58
};
59
60
61
}
// namespace ns3
62
63
#endif
/* NS3_HISTOGRAM_H */
ns3::Histogram::GetBinEnd
double GetBinEnd(uint32_t index)
Definition:
histogram.cc:54
ns3::Histogram::GetBinWidth
double GetBinWidth(uint32_t index) const
Definition:
histogram.cc:60
ns3::Histogram::m_histogram
std::vector< uint32_t > m_histogram
Definition:
histogram.h:56
ns3::Histogram::m_binWidth
double m_binWidth
Definition:
histogram.h:57
check-style.indent
def indent
Definition:
check-style.py:286
ns3::Histogram::GetNBins
uint32_t GetNBins() const
Definition:
histogram.cc:42
ns3::Histogram::SetDefaultBinWidth
void SetDefaultBinWidth(double binWidth)
Definition:
histogram.cc:66
ns3::Histogram::GetBinCount
uint32_t GetBinCount(uint32_t index)
Definition:
histogram.cc:73
ns3::Histogram::GetBinStart
double GetBinStart(uint32_t index)
Definition:
histogram.cc:48
ns3::Histogram::Histogram
Histogram()
Definition:
histogram.cc:99
ns3::Histogram::AddValue
void AddValue(double value)
Definition:
histogram.cc:80
ns3::Histogram
Definition:
histogram.h:30
ns3::Histogram::SerializeToXmlStream
void SerializeToXmlStream(std::ostream &os, int indent, std::string elementName) const
Definition:
histogram.cc:106
src
flow-monitor
model
histogram.h
Generated on Sat Nov 16 2013 12:55:27 for ns-3 by
1.8.5