From 2faef5179503c0833dd09a656204a6e084998530 Mon Sep 17 00:00:00 2001 From: Ted Turocy Date: Thu, 23 May 2024 11:42:21 +0100 Subject: [PATCH] Fix format and tidy warnings. --- src/solvers/logit/logbehav.imp | 9 +++++---- src/solvers/logit/logit.h | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/solvers/logit/logbehav.imp b/src/solvers/logit/logbehav.imp index 252f7f5b6..4126523b0 100644 --- a/src/solvers/logit/logbehav.imp +++ b/src/solvers/logit/logbehav.imp @@ -160,8 +160,8 @@ T LogBehavProfile::DiffNodeValue(const GameNode &p_node, const GamePlayer &p_ else { T deriv = T(0); for (auto action : infoset->GetActions()) { - deriv += (DiffNodeValue(p_node->GetChild(action), p_player, p_oppAction) * - GetActionProb(action)); + deriv += + (DiffNodeValue(p_node->GetChild(action), p_player, p_oppAction) * GetActionProb(action)); } return deriv; } @@ -208,8 +208,9 @@ template void LogBehavProfile::ComputeSolutionDataPass2(const GameN template void LogBehavProfile::ComputeSolutionDataPass1(const GameNode &node) const { - m_logRealizProbs[node] = - (node->GetParent()) ? m_logRealizProbs[node->GetParent()] + GetLogActionProb(node->GetPriorAction()) : T(0); + m_logRealizProbs[node] = (node->GetParent()) ? m_logRealizProbs[node->GetParent()] + + GetLogActionProb(node->GetPriorAction()) + : T(0); for (auto child : node->GetChildren()) { ComputeSolutionDataPass1(child); } diff --git a/src/solvers/logit/logit.h b/src/solvers/logit/logit.h index b3c534fd8..6dcea76a8 100644 --- a/src/solvers/logit/logit.h +++ b/src/solvers/logit/logit.h @@ -23,6 +23,8 @@ #ifndef SOLVERS_LOGIT_H #define SOLVERS_LOGIT_H +#include + namespace Gambit { template class LogitQRE {