-
-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
Description
What is the proper Julia counterpart of QuantEcon/QuantEcon.py#382?
-
Add a field
payoff_arraystoNormalFormGame:struct NormalFormGame{N,T<:Real} players::NTuple{N,Player{N,T}} nums_actions::NTuple{N,Int} payoff_arrays::NTuple{N,Array{T,N}} end
This seems not to be very Julian?
And this requires adding the same code of generating the tuple to many constructors. -
Add a method
payoff_arraystoNormalFormGame:payoff_arrays(g::NormalFormGame{N,T}) where {N,T} = tuple([player.payoff_array for player in g.players]...)::NTuple{N,Array{T,N}}
This is what I had in mind initially, but now I want to avoid this as it will introduce a conflict with the likely usage of
payoff_arraysas a variable name. -
Name the above method
get_payoff_arrays:Sounds too long? And to "get" payoff arrays, one could just call
g.players[i].payoff_array.
Reactions are currently unavailable