Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
PlayerCoalition.cpp
Go to the documentation of this file.
1
#include "
storm/logic/PlayerCoalition.h
"
2
#include <ostream>
3
4
namespace
storm
{
5
namespace
logic {
6
7
PlayerCoalition::PlayerCoalition
(std::vector<std::variant<std::string, storm::storage::PlayerIndex>>
const
& playerIds) : _playerIds(playerIds) {
8
// Intentionally left empty.
9
}
10
11
std::vector<std::variant<std::string, storm::storage::PlayerIndex>>
const
&
PlayerCoalition::getPlayers
()
const
{
12
return
_playerIds;
13
}
14
15
template
<
typename
T0,
typename
... Ts>
16
std::ostream&
operator<<
(std::ostream& s, std::variant<T0, Ts...>
const
& v) {
17
std::visit([&](
auto
&& arg) { s << arg; }, v);
18
return
s;
19
}
20
21
std::ostream&
operator<<
(std::ostream& stream,
PlayerCoalition
const
& coalition) {
22
bool
firstItem =
true
;
23
for
(
auto
const
&
id
: coalition._playerIds) {
24
if
(firstItem) {
25
firstItem =
false
;
26
}
else
{
27
stream <<
","
;
28
}
29
stream << id;
30
}
31
return
stream;
32
}
33
}
// namespace logic
34
}
// namespace storm
PlayerCoalition.h
storm::logic::PlayerCoalition
Definition
PlayerCoalition.h:12
storm::logic::PlayerCoalition::PlayerCoalition
PlayerCoalition()=default
storm::logic::PlayerCoalition::getPlayers
std::vector< std::variant< std::string, storm::storage::PlayerIndex > > const & getPlayers() const
Definition
PlayerCoalition.cpp:11
storm::logic::operator<<
std::ostream & operator<<(std::ostream &out, Bound const &bound)
Definition
Bound.h:40
storm
LabParser.cpp.
Definition
cli.cpp:18
src
storm
logic
PlayerCoalition.cpp
Generated by
1.9.8