Skip to content

Commit 6292dd9

Browse files
Renamed m_reachable m_reachableInfosets
1 parent d6df526 commit 6292dd9

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/games/behavspt.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ size_t BehaviorSupportProfile::BehaviorProfileLength() const
6767

6868
void BehaviorSupportProfile::AddAction(const GameAction &p_action)
6969
{
70-
m_reachable = nullptr;
70+
m_reachableInfosets = nullptr;
7171
auto &support = m_actions.at(p_action->GetInfoset());
7272
auto pos = std::find_if(support.begin(), support.end(), [p_action](const GameAction &a) {
7373
return a->GetNumber() >= p_action->GetNumber();
@@ -83,7 +83,7 @@ void BehaviorSupportProfile::AddAction(const GameAction &p_action)
8383

8484
bool BehaviorSupportProfile::RemoveAction(const GameAction &p_action)
8585
{
86-
m_reachable = nullptr;
86+
m_reachableInfosets = nullptr;
8787
auto &support = m_actions.at(p_action->GetInfoset());
8888
auto pos = std::find(support.begin(), support.end(), p_action);
8989
if (pos != support.end()) {
@@ -338,7 +338,7 @@ void BehaviorSupportProfile::FindReachableInfosets(GameNode p_node) const
338338
}
339339
}
340340
else {
341-
(*m_reachable)[infoset] = true;
341+
(*m_reachableInfosets)[infoset] = true;
342342
for (auto action : GetActions(infoset)) {
343343
FindReachableInfosets(p_node->GetChild(action));
344344
}
@@ -348,17 +348,17 @@ void BehaviorSupportProfile::FindReachableInfosets(GameNode p_node) const
348348

349349
std::shared_ptr<std::map<GameInfoset, bool>> BehaviorSupportProfile::GetReachableInfosets() const
350350
{
351-
if (!m_reachable) {
352-
m_reachable = std::make_shared<std::map<GameInfoset, bool>>();
351+
if (!m_reachableInfosets) {
352+
m_reachableInfosets = std::make_shared<std::map<GameInfoset, bool>>();
353353
for (size_t pl = 0; pl <= GetGame()->NumPlayers(); pl++) {
354354
const GamePlayer player = (pl == 0) ? GetGame()->GetChance() : GetGame()->GetPlayer(pl);
355355
for (const auto &infoset : player->GetInfosets()) {
356-
(*m_reachable)[infoset] = false;
356+
(*m_reachableInfosets)[infoset] = false;
357357
}
358358
}
359359
FindReachableInfosets(GetGame()->GetRoot());
360360
}
361-
return m_reachable;
361+
return m_reachableInfosets;
362362
}
363363

364364
} // end namespace Gambit

src/games/behavspt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ class BehaviorSupportProfile {
185185
Infosets GetInfosets() const { return Infosets(this); };
186186
Contingencies GetContingencies() const;
187187

188-
mutable std::shared_ptr<std::map<GameInfoset, bool>> m_reachable;
188+
mutable std::shared_ptr<std::map<GameInfoset, bool>> m_reachableInfosets;
189189
void FindReachableInfosets(GameNode p_node) const;
190190
std::shared_ptr<std::map<GameInfoset, bool>> GetReachableInfosets() const;
191191
};

0 commit comments

Comments
 (0)