Player12
An open source football management simulator
Loading...
Searching...
No Matches
DataHub Namespace Reference

Functions

TeamAnalytics buildTeamAnalytics (const DataHubInput &input)
 
std::vector< PlayerAnalyticsRow > buildPlayerAnalytics (const DataHubInput &input)
 
bool hasStatistics (const MatchReport &report)
 
float leaderValue (const PlayerAnalyticsRow &row, LeaderMetric metric)
 
int leaderMinutes (const PlayerAnalyticsRow &row, LeaderMetric metric)
 
std::vector< std::size_t > leaders (std::span< const PlayerAnalyticsRow > rows, LeaderMetric metric)
 

Variables

constexpr int MIN_MATCHES = 3
 
constexpr std::size_t ROLLING_WINDOW = 5
 
constexpr std::size_t RATING_HISTORY = 10
 
constexpr std::size_t LEADERS = 5
 
constexpr int LEADER_MIN_MINUTES = 90
 

Function Documentation

◆ buildPlayerAnalytics()

std::vector< PlayerAnalyticsRow > DataHub::buildPlayerAnalytics ( const DataHubInput &  input)

Players with at least one appearance, most minutes first.

◆ buildTeamAnalytics()

TeamAnalytics DataHub::buildTeamAnalytics ( const DataHubInput &  input)

◆ hasStatistics()

bool DataHub::hasStatistics ( const MatchReport &  report)

True when a report carries engine statistics (not a bare score).

◆ leaderMinutes()

int DataHub::leaderMinutes ( const PlayerAnalyticsRow &  row,
LeaderMetric  metric 
)

Minutes behind a leaderboard metric (its per-90 base).

◆ leaders()

std::vector< std::size_t > DataHub::leaders ( std::span< const PlayerAnalyticsRow >  rows,
LeaderMetric  metric 
)

Indices into rows of the top players by season total, best first.

◆ leaderValue()

float DataHub::leaderValue ( const PlayerAnalyticsRow &  row,
LeaderMetric  metric 
)

Season total of a leaderboard metric.

Variable Documentation

◆ LEADER_MIN_MINUTES

constexpr int DataHub::LEADER_MIN_MINUTES = 90
inlineconstexpr

Minutes before a player enters a leaderboard.

◆ LEADERS

constexpr std::size_t DataHub::LEADERS = 5
inlineconstexpr

◆ MIN_MATCHES

constexpr int DataHub::MIN_MATCHES = 3
inlineconstexpr

Matches needed before trends and comparisons are shown.

◆ RATING_HISTORY

constexpr std::size_t DataHub::RATING_HISTORY = 10
inlineconstexpr

◆ ROLLING_WINDOW

constexpr std::size_t DataHub::ROLLING_WINDOW = 5
inlineconstexpr