Player12
An open source football management simulator
Loading...
Searching...
No Matches
Lab::MatchSample Struct Reference

#include <lab_runner.h>

Public Member Functions

int totalGoals () const
 

Public Attributes

std::uint32_t seed = 0
 
bool detailed = false
 
bool abandoned = false
 
std::array< float, 2 > rating {}
 
std::array< int, 2 > goals {}
 
std::array< int, 2 > shots {}
 
std::array< int, 2 > on_target {}
 
std::array< int, 2 > passes_attempted {}
 
std::array< int, 2 > passes_completed {}
 
std::array< int, 2 > fouls {}
 
std::array< double, 2 > xg {}
 
float home_possession = 50.0f
 
int corners = 0
 
int yellows = 0
 
int reds = 0
 
int offsides = 0
 
int own_goals = 0
 
int late_goals = 0
 
std::array< int, GOAL_TIME_BINS > goal_bins {}
 
int inside_box = 0
 
int headed_goals = 0
 
int set_piece_goals = 0
 
int penalty_goals = 0
 
int penalties = 0
 
int substitutions = 0
 
double substitution_minute_sum = 0.0
 
int injuries = 0
 
int added_minutes = 0
 
double ball_in_play = 0.0
 
double match_length = 0.0
 
int full_match_players = 0
 
double full_match_distance = 0.0
 
double first_half_distance = 0.0
 
double second_half_distance = 0.0
 
double first_half_minutes = 0.0
 
double second_half_minutes = 0.0
 
std::array< double, 3 > state_minutes {}
 
std::array< int, 3 > state_goals {}
 
std::array< double, 3 > strength_minutes {}
 
std::array< int, 3 > strength_goals {}
 

Detailed Description

Compact per-match record extracted on the simulating thread. Index 0 is the home team, 1 the away team. detailed samples come from the live engine; world samples built from a MatchReport lack the engine-only fields (they stay 0 and the metrics needing them are skipped).

Member Function Documentation

◆ totalGoals()

int Lab::MatchSample::totalGoals ( ) const
inline

Member Data Documentation

◆ abandoned

bool Lab::MatchSample::abandoned = false

◆ added_minutes

int Lab::MatchSample::added_minutes = 0

◆ ball_in_play

double Lab::MatchSample::ball_in_play = 0.0

◆ corners

int Lab::MatchSample::corners = 0

◆ detailed

bool Lab::MatchSample::detailed = false

◆ first_half_distance

double Lab::MatchSample::first_half_distance = 0.0

Distance of those players by half and the half lengths (minutes).

◆ first_half_minutes

double Lab::MatchSample::first_half_minutes = 0.0

◆ fouls

std::array<int, 2> Lab::MatchSample::fouls {}

◆ full_match_distance

double Lab::MatchSample::full_match_distance = 0.0

◆ full_match_players

int Lab::MatchSample::full_match_players = 0

Outfield starters who played the whole match.

◆ goal_bins

std::array<int, GOAL_TIME_BINS> Lab::MatchSample::goal_bins {}

◆ goals

std::array<int, 2> Lab::MatchSample::goals {}

◆ headed_goals

int Lab::MatchSample::headed_goals = 0

◆ home_possession

float Lab::MatchSample::home_possession = 50.0f

◆ injuries

int Lab::MatchSample::injuries = 0

◆ inside_box

int Lab::MatchSample::inside_box = 0

◆ late_goals

int Lab::MatchSample::late_goals = 0

Goals at second-half clock minute >= 90.

◆ match_length

double Lab::MatchSample::match_length = 0.0

◆ offsides

int Lab::MatchSample::offsides = 0

◆ on_target

std::array<int, 2> Lab::MatchSample::on_target {}

◆ own_goals

int Lab::MatchSample::own_goals = 0

◆ passes_attempted

std::array<int, 2> Lab::MatchSample::passes_attempted {}

◆ passes_completed

std::array<int, 2> Lab::MatchSample::passes_completed {}

◆ penalties

int Lab::MatchSample::penalties = 0

◆ penalty_goals

int Lab::MatchSample::penalty_goals = 0

◆ rating

std::array<float, 2> Lab::MatchSample::rating {}

◆ reds

int Lab::MatchSample::reds = 0

◆ second_half_distance

double Lab::MatchSample::second_half_distance = 0.0

◆ second_half_minutes

double Lab::MatchSample::second_half_minutes = 0.0

◆ seed

std::uint32_t Lab::MatchSample::seed = 0

◆ set_piece_goals

int Lab::MatchSample::set_piece_goals = 0

Includes penalties (engine definition of a set-piece shot).

◆ shots

std::array<int, 2> Lab::MatchSample::shots {}

◆ state_goals

std::array<int, 3> Lab::MatchSample::state_goals {}

◆ state_minutes

std::array<double, 3> Lab::MatchSample::state_minutes {}

Team-minutes and goals by game state, summed over both teams.

◆ strength_goals

std::array<int, 3> Lab::MatchSample::strength_goals {}

◆ strength_minutes

std::array<double, 3> Lab::MatchSample::strength_minutes {}

◆ substitution_minute_sum

double Lab::MatchSample::substitution_minute_sum = 0.0

◆ substitutions

int Lab::MatchSample::substitutions = 0

◆ xg

std::array<double, 2> Lab::MatchSample::xg {}

◆ yellows

int Lab::MatchSample::yellows = 0

The documentation for this struct was generated from the following file: