23#ifndef BCEDATASTATE_HPP
24#define BCEDATASTATE_HPP
26#include "bcesolution.hpp"
28#include "bceabstractgame.hpp"
29#include "bceenumeration.hpp"
30#include "bceslider.hpp"
31#include "bcelineedit.hpp"
32#include "bcelabel.hpp"
37#include <boost/filesystem.hpp>
259 case Action:
return actions[player];
261 case Type:
return types[player];
263 case State:
return state;
375 return sqrt(pow((y2-y1),2)+pow((x2-x1),2));
int getNumObjectives() const
Returns the number of objectives.
Definition: bceabstractgame.hpp:245
Class for storing and manipulating solution data used by the plot handler.
Definition: bcedatastate.hpp:52
const string getGUITitle() const
Shares file name of currently loaded file with BCEWindow.
Definition: bcedatastate.hpp:304
void sliderLabelsChanged(bool privateVals, int player)
Signals that a slider control has been moved by the user.
string guiTitle
File name of example currently displayed in the GUI.
Definition: bcedatastate.hpp:163
void setupControlsLayout()
Builds the controls layout in the solution tab.
Definition: bcedatastate.cpp:110
bool margS0
If true, GUI displays marginal distribution for player's state.
Definition: bcedatastate.hpp:165
void valueChanged(int val, BCESliderType st, int player)
Signal for a changed slider value.
void modifyEqmFocus(double x, double y)
Changes current equilibrium index for stored BCEData.
Definition: bcedatastate.cpp:255
BCEGame gameData
Currently active BCEGame in the GUI.
Definition: bcedatastate.hpp:161
void equilibriumMatrixChanged()
Signals to the solution tab that equilibriumMatrix has been manipulated.
QVector< BCESlider * > sliderGroup
Vector of Slider Controls.
Definition: bcedatastate.hpp:190
const vector< vector< double > > & getObjectiveValues() const
Shares memory location of objectiveValues with BCEPlotHandler.
Definition: bcedatastate.hpp:282
void setSliderValue(int value, BCESliderType st, int player)
Changes stored slider data.
Definition: bcedatastate.cpp:202
double euclidianDistance(double x1, double x2, double y1, double y2)
Helper function for modifyEqmFocus.
Definition: bcedatastate.hpp:374
const vector< vector< double > > & getEqmMatrix() const
Shares memory location of equilibriumMatrix with BCEPlotHandler.
Definition: bcedatastate.hpp:273
void setAllEqm()
Resets BCE Value Set Plot data.
Definition: bcedatastate.cpp:361
void newStateSignal(int value0, int value1, int state, bool privateVals)
Signals changed state information and type of state (common or private).
void setSolutionData(const BCESolution &solution, const bool isBoundaryMapped)
Loads new data into the GUI.
Definition: bcedatastate.cpp:56
void eqmCoordSignal(double xCoord, double yCoord)
Signals coordinates of the current equilibrium.
const BCESolution & getSolution() const
Shares the current BCESolution by reference.
Definition: bcedatastate.hpp:299
vector< int > actions
A 2 element vector holding the current action for each player.
Definition: bcedatastate.hpp:149
bool isDataLoaded
Notes if data is currently loaded into the GUI.
Definition: bcedatastate.hpp:145
void newDataLoaded()
Signal that new data has been loaded.
const vector< vector< double > > & getMapBWeights() const
Sends map boundary weights to the plot handler.
Definition: bcedatastate.hpp:230
void devPlotPrChange(int player, double probability)
Signals data for changing deviation bar plots' titles.
vector< int > values
A 2 element vector holding the current state for each player.
Definition: bcedatastate.hpp:153
QWidget * controlsLayout
Layout Holding Sliders and Other Data Controls.
Definition: bcedatastate.hpp:227
const vector< vector< double > > & getAllEqm() const
Shares memory location of allEqm with BCEPlotHandler.
Definition: bcedatastate.hpp:290
void setEqmMatrix()
Resets heatmap data.
Definition: bcedatastate.cpp:292
int currentEqmIndex
Index of equilibrium currently displayed in the GUI.
Definition: bcedatastate.hpp:172
bool isPrivateVals
If true, GUI is displaying solution of a private-states game.
Definition: bcedatastate.hpp:157
void objectiveValuesChanged(int player)
Signals to the solution tab that objectiveValues have been manipulated.
vector< bool > margA
If true, GUI displays marginal distribution for player's action/type.
Definition: bcedatastate.hpp:170
BCESolution solutionData
Currently active BCESolution in the GUI.
Definition: bcedatastate.hpp:159
vector< vector< double > > equilibriumMatrix
Data displayed in the GUI's heatmap.
Definition: bcedatastate.hpp:174
int state
Holds the current state of a common-states game.
Definition: bcedatastate.hpp:155
QVector< BCELineEdit * > lineEditGroup
Vector of Line Edits.
Definition: bcedatastate.hpp:198
vector< int > types
A 2 element vector holding the current type for each player.
Definition: bcedatastate.hpp:151
bool conditionedOnState
Tells whether equilibriumMatrix is conditioned on State.
Definition: bcedatastate.hpp:200
const int getCurrentSliderVal(BCESliderType st, int player) const
Returns current integer value of a slider.
Definition: bcedatastate.hpp:257
BCEDataState()
Default constructor.
Definition: bcedatastate.cpp:25
void selectedEqmChanged()
Signal that data for the set of BCE plot has been changed.
vector< vector< double > > allEqm
Data displayed in the GUI's BCE Value Set Plot.
Definition: bcedatastate.hpp:183
void devPlotTitleChange(int player, int aciton, int type, double payoff)
Signals data for changing deviation bar plots' titles.
bool isMapped
Gives if boundary was mapped in the solution object.
Definition: bcedatastate.hpp:147
void setConditionOnState(bool conditioned)
Alters whether data in equilibriumMatrix is conditional on state.
Definition: bcedatastate.hpp:309
vector< vector< double > > objectiveValues
Data displayed in the GUI's bar plots.
Definition: bcedatastate.hpp:176
int shareDataProperties(BCESliderType st, int player)
Shares basic game data (e.g. numActions) with BCEWindow.
Definition: bcedatastate.cpp:45
void sendException(QString message)
Sends an exception message to BCEWindow to be displayed.
const int getCurrentEqmIndex() const
Returns the current eqm index stored in BCEDataState.
Definition: bcedatastate.hpp:248
void setObjectiveVals(int player)
Resets deviation bar plot data.
Definition: bcedatastate.cpp:344
const int getNumObjs() const
Sends the number of objectives to the plot handler.
Definition: bcedatastate.hpp:235
void resetManipulatedData()
Calls all "set" data functions.
Definition: bcedatastate.cpp:248
The base class for games of incomplete information.
Definition: bcegame.hpp:40
Class for storing data produced by BCESolver.
Definition: bcesolution.hpp:64
const vector< vector< double > > & getMapBoundaryWeights() const
Returns the mapBoundary weights.
Definition: bcesolution.hpp:188