subtr_actor/stats/mod.rs
1#![allow(ambiguous_glob_reexports)]
2//! Replay analysis: detect gameplay mechanics, accumulate stats, and export
3//! them.
4//!
5//! This module ties together four layers:
6//!
7//! - [`analysis_graph`] — the [`AnalysisNode`](analysis_graph::AnalysisNode)
8//! dependency DAG that drives everything. Start here for the runtime model.
9//! - **Calculators** — the detection logic wrapped by analysis nodes. Each
10//! detects one mechanic or maintains one piece of derived state and emits
11//! typed events implementing [`StatsEvent`]. They are re-exported at this
12//! module's root (the `*Calculator` / `*Event` types in the item list below).
13//! - [`accumulators`] — plain structs that fold a calculator's events into
14//! running per-player / per-team / per-match totals over the replay.
15//! - [`export`] — the report-facing stat-field model: each accumulator
16//! implements [`StatFieldProvider`] to publish its
17//! values as labeled, unit-tagged [`ExportedStat`]s.
18//! - [`timeline`] — assembles per-frame stat timelines for playback UIs.
19//!
20//! # The calculators
21//!
22//! Calculators group by what they produce (browse them via the [`StatsEvent`]
23//! *Implementors* list, or the `*Calculator` entries in the item list):
24//!
25//! - **Mechanics** — [`FlickCalculator`], [`HalfFlipCalculator`],
26//! [`SpeedFlipCalculator`], [`WavedashCalculator`],
27//! [`PowerslideCalculator`], [`FlipImpulseCalculator`],
28//! [`DodgeResetCalculator`], [`WallAerialCalculator`],
29//! [`WallAerialShotCalculator`], [`CeilingShotCalculator`],
30//! [`DoubleTapCalculator`], [`HalfVolleyCalculator`], [`OneTimerCalculator`],
31//! [`BallCarryCalculator`] (carries / air dribbles).
32//! - **Play & contests** — [`TouchCalculator`], [`PassCalculator`],
33//! [`CenterCalculator`], [`KickoffCalculator`], [`BumpCalculator`],
34//! [`DemoCalculator`], [`RushCalculator`], [`ControlledPlayCalculator`],
35//! [`TerritorialPressureCalculator`], [`WhiffCalculator`],
36//! [`FiftyFiftyCalculator`], [`BackboardCalculator`].
37//! - **Derived state** — [`PossessionCalculator`],
38//! [`PlayerPossessionCalculator`], [`PositioningCalculator`],
39//! [`RotationCalculator`], [`MovementCalculator`], [`BoostCalculator`],
40//! [`PlayerVerticalStateCalculator`], [`LivePlayTracker`].
41//! - **Match-level** — [`MatchStatsCalculator`] and the goal-tag calculators
42//! (the `*GoalCalculator` types).
43//!
44//! See the [stats-runtime guide](crate::guides::calculators_and_analysis_nodes)
45//! and the [confidence guide](crate::guides::stat_confidence).
46
47pub mod accumulators;
48pub mod analysis_graph;
49pub(crate) mod calculators;
50pub(crate) mod common;
51pub mod labels;
52pub mod timeline;
53
54pub use accumulators::*;
55pub use calculators::*;
56pub use labels::*;
57pub use timeline::*;