1.00.16
C++ Simulated Travel Demand Generation Library
Toggle main menu visibility
Loading...
Searching...
No Matches
RandomGenerationContext.hpp
Go to the documentation of this file.
1
#ifndef __TRADEMGEN_BAS_RANDOM_GENERATION_CONTEXT_HPP
2
#define __TRADEMGEN_BAS_RANDOM_GENERATION_CONTEXT_HPP
3
4
// //////////////////////////////////////////////////////////////////////
5
// Import section
6
// //////////////////////////////////////////////////////////////////////
7
// STL
8
#include <iosfwd>
9
#include <string>
10
// StdAir
11
#include <stdair/stdair_basic_types.hpp>
12
#include <stdair/stdair_maths_types.hpp>
13
#include <stdair/basic/StructAbstract.hpp>
14
15
namespace
TRADEMGEN
{
16
20
struct
RandomGenerationContext
:
public
stdair::StructAbstract {
21
public
:
22
// ////////// Getters /////////
26
const
stdair::Count_T&
getNumberOfRequestsGeneratedSoFar
()
const
{
27
return
_numberOfRequestsGeneratedSoFar;
28
}
29
34
const
stdair::Probability_T&
getCumulativeProbabilitySoFar
()
const
{
35
return
_cumulativeProbabilitySoFar;
36
}
37
38
public
:
39
// ////////// Setters /////////
43
void
setNumberOfRequestsGeneratedSoFar
(
const
stdair::Count_T& iCount) {
44
_numberOfRequestsGeneratedSoFar = iCount;
45
}
46
51
void
setCumulativeProbabilitySoFar
(
const
stdair::Probability_T& iProb) {
52
_cumulativeProbabilitySoFar = iProb;
53
}
54
55
56
public
:
57
// ////////// Constructors and destructors /////////
61
RandomGenerationContext
();
62
66
RandomGenerationContext
(
const
RandomGenerationContext
&);
67
71
~RandomGenerationContext
();
72
73
74
public
:
75
// /////////////// Business Methods //////////
79
void
incrementGeneratedRequestsCounter
();
80
84
void
reset
();
85
86
87
public
:
88
// ////////////// Display Support Methods //////////
92
const
std::string
describe
()
const
;
93
94
95
private
:
96
// ////////// Attributes //////////
100
stdair::Count_T _numberOfRequestsGeneratedSoFar;
101
106
stdair::Probability_T _cumulativeProbabilitySoFar;
107
};
108
109
}
110
#endif
// __STDAIR_BAS_RANDOM_GENERATION_CONTEXT_HPP
TRADEMGEN
Definition
BasConst.cpp:10
TRADEMGEN::RandomGenerationContext
Definition
RandomGenerationContext.hpp:20
TRADEMGEN::RandomGenerationContext::setCumulativeProbabilitySoFar
void setCumulativeProbabilitySoFar(const stdair::Probability_T &iProb)
Definition
RandomGenerationContext.hpp:51
TRADEMGEN::RandomGenerationContext::setNumberOfRequestsGeneratedSoFar
void setNumberOfRequestsGeneratedSoFar(const stdair::Count_T &iCount)
Definition
RandomGenerationContext.hpp:43
TRADEMGEN::RandomGenerationContext::reset
void reset()
Definition
RandomGenerationContext.cpp:43
TRADEMGEN::RandomGenerationContext::describe
const std::string describe() const
Definition
RandomGenerationContext.cpp:30
TRADEMGEN::RandomGenerationContext::~RandomGenerationContext
~RandomGenerationContext()
Definition
RandomGenerationContext.cpp:26
TRADEMGEN::RandomGenerationContext::getCumulativeProbabilitySoFar
const stdair::Probability_T & getCumulativeProbabilitySoFar() const
Definition
RandomGenerationContext.hpp:34
TRADEMGEN::RandomGenerationContext::getNumberOfRequestsGeneratedSoFar
const stdair::Count_T & getNumberOfRequestsGeneratedSoFar() const
Definition
RandomGenerationContext.hpp:26
TRADEMGEN::RandomGenerationContext::RandomGenerationContext
RandomGenerationContext()
Definition
RandomGenerationContext.cpp:13
TRADEMGEN::RandomGenerationContext::incrementGeneratedRequestsCounter
void incrementGeneratedRequestsCounter()
Definition
RandomGenerationContext.cpp:38
Generated on
for TraDemGen by
1.17.0