MultiAgentDecisionProcess
Release 0.2.1
Main Page
Namespaces
Classes
Files
File List
File Members
StateDistributionVector.h
Go to the documentation of this file.
1
28
/* Only include this header file once. */
29
#ifndef _STATEDISTRIBUTIONVECTOR_H_
30
#define _STATEDISTRIBUTIONVECTOR_H_ 1
31
32
/* the include directives */
33
#include "
Globals.h
"
34
#include "
StateDistribution.h
"
35
36
37
namespace
{
38
typedef
std::vector<double> SDV;
39
}
40
43
class
StateDistributionVector
:
44
public
StateDistribution
,
45
public
SDV
46
{
47
private
:
48
49
protected
:
50
51
public
:
52
// Constructor, destructor and copy assignment.
54
StateDistributionVector
()
55
:
56
SDV()
57
{};
58
60
StateDistributionVector
(
const
StateDistributionVector
& a)
61
:
62
SDV(a)
63
{};
64
StateDistributionVector
(
const
SDV& a)
65
:
66
SDV(a)
67
{};
69
~StateDistributionVector
(){};
71
StateDistributionVector
&
operator=
(
const
StateDistributionVector
& o)
72
{
73
if
(
this
== &o)
return
*
this
;
// Gracefully handle self assignment
74
this->
SDV::operator=
(o);
75
return
*
this
;
76
}
77
StateDistributionVector
&
operator=
(
const
SDV& o)
78
{
79
if
(
this
== &o)
return
*
this
;
// Gracefully handle self assignment
80
this->
SDV::operator=
(o);
81
return
*
this
;
82
}
83
84
//operators:
85
86
//data manipulation (set) functions:
87
88
//get (data) functions:
89
virtual
double
GetProbability
(
Index
sI)
const
90
{
return
this->at(sI); }
91
92
virtual
std::vector<double>
ToVectorOfDoubles
()
const
93
{
return
*
this
; }
94
96
virtual
StateDistributionVector
*
Clone
()
const
97
{
return
new
StateDistributionVector
(*
this
); }
98
99
virtual
std::string
SoftPrint
()
const
100
{
return
SoftPrintVector
( *((SDV*)
this
) ); }
101
};
102
103
104
#endif
/* !_STATEDISTRIBUTIONVECTOR_H_ */
105
106
// Local Variables: ***
107
// mode:c++ ***
108
// End: ***
src
base
StateDistributionVector.h
Generated on Mon Sep 23 2013 14:50:05 for MultiAgentDecisionProcess by
1.8.1.2