MultiAgentDecisionProcess
Release 0.2.1
Main Page
Namespaces
Classes
Files
File List
File Members
MADPComponentDiscreteStates.h
Go to the documentation of this file.
1
28
/* Only include this header file once. */
29
#ifndef _MADPCOMPONENTDISCRETESTATES_H_
30
#define _MADPCOMPONENTDISCRETESTATES_H_ 1
31
32
/* the include directives */
33
#include <iostream>
34
#include <vector>
35
#include "
Globals.h
"
36
37
#include "
MultiAgentDecisionProcessDiscreteInterface.h
"
38
#include "
StateDiscrete.h
"
39
40
#include "
StateDistributionVector.h
"
41
48
class
MADPComponentDiscreteStates
:
49
virtual
public
MultiAgentDecisionProcessDiscreteInterface
//which this implements partly
50
{
51
private
:
52
bool
_m_initialized
;
53
size_t
_m_nrStates
;
54
56
std::string
SoftPrintStates
()
const
;
58
std::string
SoftPrintInitialStateDistribution
()
const
;
59
60
protected
:
62
std::vector<StateDiscrete>
_m_stateVec
;
64
StateDistributionVector
*
_m_initialStateDistribution
;
65
66
public
:
67
// Constructor, destructor and copy assignment.
69
MADPComponentDiscreteStates
();
71
MADPComponentDiscreteStates
(
size_t
nrS);
72
74
virtual
~MADPComponentDiscreteStates
();
75
76
//operators:
77
78
//data manipulation (set) functions:
80
bool
SetInitialized
(
bool
b);
81
83
void
AddState
(std::string StateName);
84
86
void
SetNrStates
(
size_t
nrS);
87
89
void
SetUniformISD
();
90
92
void
SetISD
(
StateDistribution
* p);
93
void
SetISD
(
StateDistributionVector
* p)
94
{
_m_initialStateDistribution
= p;}
95
void
SetISD
(std::vector<double> v);
96
97
//get (data) functions:
99
size_t
GetNrStates
()
const
{
return
_m_nrStates
;};
100
102
Index
GetStateIndex
(
StateDiscrete
s)
const
;
103
105
Index
GetStateIndexByName
(std::string s)
const
;
106
108
const
State
*
GetState
(
Index
i)
const
109
{
return
(&
_m_stateVec
.at(i)); }
110
111
virtual
std::string
SoftPrintState
(
Index
sI)
const
112
{
return
GetStateName
(sI);}
114
std::string
GetStateName
(
Index
i)
const
{
115
return
(
_m_stateVec
.at(i).SoftPrintBrief()); }
116
118
double
GetInitialStateProbability
(
Index
sI)
const
;
119
121
//std::vector<double> GetISD() const { return(_m_initialStateDistribution); }
122
virtual
StateDistribution
*
GetISD
()
123
{
return
(
_m_initialStateDistribution
); }
124
virtual
const
StateDistribution
*
GetISD
()
const
125
{
return
(
_m_initialStateDistribution
); }
126
128
Index
SampleInitialState
()
const
;
129
130
std::string
SoftPrint
()
const
;
131
void
Print
()
const
132
{std::cout <<
SoftPrint
();}
133
};
134
135
136
#endif
/* !_MADPCOMPONENTDISCRETESTATES_H_ */
137
138
139
// Local Variables: ***
140
// mode:c++ ***
141
// End: ***
src
base
MADPComponentDiscreteStates.h
Generated on Mon Sep 23 2013 14:50:05 for MultiAgentDecisionProcess by
1.8.1.2