BCESolve
BCEPlotHandler Class Reference

This class handles all the plotting in the solution tab. More...

#include <bceplothandler.hpp>

Inheritance diagram for BCEPlotHandler:
Collaboration diagram for BCEPlotHandler:

Public Slots

void plotEqm ()
 Plots Bayes Correlated Equilibria. More...
 
void plotDeviationObjectives (int player)
 Plots Bar Graphs for Player Deviation Objectives. More...
 
void plotBCEValueSet ()
 Plots set of equilibria player payoffs. More...
 
void setGUITitle ()
 Sets a new title for the GUI using fileName information.
 
void toggleLinearScale (bool checked)
 Toggles colorScale between linear and log scales.
 
void toggleColorfulTheme (bool checked)
 Toggles color gradient between blue and gpSpectrum themes.
 

Signals

void sendingDataPath (QString location)
 Sends data path to BCEDataState.
 

Public Member Functions

 BCEPlotHandler (QWidget *parent)
 Constructor.
 
 ~BCEPlotHandler ()
 Destructor.
 
QHBoxLayout * getLayout () const
 Returns Layout of the Plot Handler.
 
void setSolution (const BCESolution &solution, const bool isBoundaryMapped)
 Sets the current BCESolution in BCEDataState.
 
const BCESolutiongetSolutionData () const
 Returns the current BCESolution in BCEDataState.
 

Public Attributes

BCEDataStateguiData
 Data in the current solution object. More...
 

Private Slots

void indicateDataLoaded ()
 Sets isSolnDataLoaded to true. More...
 

Private Member Functions

void setupLayout ()
 Sets up the layout of the plot handler.
 

Private Attributes

QHBoxLayout * mainTab
 Layout for the Plot Handler.
 
BCEValueSetPlotconditionalMarginalPlot
 Heatmap template. More...
 
QCPColorMap * colorMap
 Heatmap. More...
 
QCPColorScale * colorScale
 Scale for heatmap colors.
 
QAction * linearScale
 Linear/Log incrementation toggle for colorScale.
 
QAction * colorfulDistn
 Colorful/Blue theme toggle for colorScale.
 
QCPColorGradient * mGradient
 Color of heatmap colorScale.
 
BCEValueSetPlotsetOfBCEPlot
 Set of BCE Plot.
 
QVector< BCEValueSetPlot * > deviationBarGraphs
 Bar Graphs.
 
QVector< BCEPlotTitle * > devPlotTitles
 Plot titles for the deviation bar plots.
 
bool isSolnDataLoaded
 Indicates if solution data is loaded in the soln tab.
 

Detailed Description

This class handles all the plotting in the solution tab.

Handles plotting and layout of the solution tab. Gets data from BCEDataState for plotting. Connects data change signals in BCEDataState with slots to change plot titles dynamically.

Member Function Documentation

◆ indicateDataLoaded

void BCEPlotHandler::indicateDataLoaded ( )
privateslot

Sets isSolnDataLoaded to true.

Allows usage of color toggles for plots and changing the colormap scale from linear to log. Prevents the program from crashing if user uses these toggles before solution data is loaded.

◆ plotBCEValueSet

void BCEPlotHandler::plotBCEValueSet ( )
slot

Plots set of equilibria player payoffs.

Slot triggered when the vector of BCEquilibria is updated after loading or when a new equilibrium index is selected. Contains additional plottables to highlight the currently selected equilibrium.

There is only one equilibrium unless mapBoundary() has been called in the loaded example's .cpp file.

◆ plotDeviationObjectives

void BCEPlotHandler::plotDeviationObjectives ( int  player)
slot

Plots Bar Graphs for Player Deviation Objectives.

Removes currently plotted data, gets new data from BCEDataState, and plots the new data in a bar graph. Contains additional plottables for highlighting players' indifferent deviations and highlighting the currently selected action. Slot is triggered when a player's objectiveValues vector matrix is changed in BCEDataState.

◆ plotEqm

void BCEPlotHandler::plotEqm ( )
slot

Plots Bayes Correlated Equilibria.

Removes currently plotted data, gets new data from BCEDataState, and plots the new data in a heat map. Slot is triggered when the equilibrium matrix is changed in BCEDataState.

Member Data Documentation

◆ colorMap

QCPColorMap* BCEPlotHandler::colorMap
private

Heatmap.

A QCustomPlot class. Contains built-in functionality for the heatmap displayed in the GUI.

◆ conditionalMarginalPlot

BCEValueSetPlot* BCEPlotHandler::conditionalMarginalPlot
private

Heatmap template.

Stores the colorMap plottable, which contains data in BCEDataState's equilibriumMatrix. Also holds the colorScale, which provides a numerical scale for the heatmap's colors.

◆ guiData

BCEDataState* BCEPlotHandler::guiData

Data in the current solution object.

Stores all data currently held or displayed in the GUI. "Held" data refers to parameters the user supplies through slider manipulation and loading actions. "Displayed" data refers to the data BCEDataState has manipulated for plotting.

Continuously manipulated upon user interaction. BCEPlotHandler has access to guiData through BCEDataState's "get" functions.


The documentation for this class was generated from the following files: