Skip to main content

Module analysis_graph

Module analysis_graph 

Source
Expand description

The analysis-graph runtime: a dependency DAG of AnalysisNodes that turn raw replay frames into derived state, gameplay events, and stats.

§How it works

Each node implements AnalysisNode: it declares the upstream state it needs via dependencies, reads that state through an AnalysisStateContext each frame in evaluate, and exposes its own typed state for downstream nodes. Source nodes read the per-frame FrameInput; higher-level nodes build on their outputs. The graph topologically resolves dependencies, so adding a node automatically pulls in everything it needs.

Most nodes are thin wrappers around a calculator (see crate::stats); the node handles graph plumbing while the calculator holds the detection logic.

§Building a graph

The names accepted by the registry are listed in [BUILTIN_ANALYSIS_NODE_NAMES] (with aliases in [BUILTIN_ANALYSIS_NODE_ALIASES]).

§The nodes

All node types are re-exported from this module; their first-line summaries appear in the item list below, and the AnalysisNode Implementors list is another way to browse them. By role:

See the stats-runtime guide for the full DAG map.

Re-exports§

pub use graph::AnalysisDependency;
pub use graph::AnalysisGraph;
pub use graph::AnalysisNode;
pub use graph::AnalysisNodeDyn;
pub use graph::AnalysisStateContext;
pub use graph::AnalysisStateRef;

Modules§

graph

Structs§

AerialGoalNode
AirDribbleGoalNode
AnalysisNodeCollector
BackboardBounceStateNode
Tracks ball bounces off the backboard from ball/player/touch state; exposes them as shared state.
BackboardNode
Derives backboard-play stats from the upstream backboard-bounce state.
BallCarryNode
Detects ball carries and air dribbles from continuous ball-control sequences.
BallFrameStateNode
Exposes per-frame ball state (position/velocity) extracted from raw frame input.
BallHalfNode
Tracks which half of the field the ball is in from ball-frame and live-play state.
BallThirdNode
BoostNode
Tracks per-player boost usage and pickups, accumulating boost stats from frame/event state.
BumpGoalNode
BumpNode
Detects player-on-player bumps from player frame/events and 50/50 state.
CeilingShotGoalNode
CeilingShotNode
Detects ceiling shots from ball/player positions and touch events during live play.
CenterNode
Detects centering passes from ball state, touches, and frame events during live play.
ContinuousBallControlNode
Tracks continuous ball-control sequences per player, emitting completed sequences.
ControlledPlayNode
Detects stretches of controlled play from ball/player positions and touches.
CounterAttackGoalNode
DemoGoalNode
DemoNode
Detects demolitions from player frame state and frame events.
DodgeResetNode
Detects flip/dodge resets and their outcomes from player, ball, touch, and event state.
DoubleTapGoalNode
DoubleTapNode
Detects double taps from touches plus backboard-bounce state during live play.
EmptyNetGoalNode
FiftyFiftyNode
Derives 50/50 stats and events from the shared fifty-fifty state node.
FiftyFiftyStateNode
Tracks 50/50 contest state from ball/player/touch/possession state as shared state.
FlickGoalNode
FlickNode
Detects flicks from ball/player state and touches during live play.
FlipImpulseNode
Detects dodges/flip impulses from player frame state (graph node name “dodge”).
FlipIntoBallGoalNode
FlipResetGoalNode
FrameEventsStateNode
Exposes per-frame discrete game events extracted from raw frame input.
FrameInfoNode
Exposes per-frame timing/frame metadata extracted from raw frame input.
GameplayStateNode
Exposes per-frame gameplay state (game phase, ball-hit, etc.) from raw frame input.
HalfFlipNode
Detects half-flips from player frame state during live play.
HalfVolleyGoalNode
Tags goals scored via a half-volley by joining match-stats goals with half-volley events.
HalfVolleyNode
Detects half-volleys from ball/player state and touches during live play.
HighAerialGoalNode
KickoffGoalNode
KickoffNode
Detects and classifies kickoffs from gameplay/ball/player state, touches, speed-flips, and boost pickups.
LivePlayNode
Determines whether each frame is live play (and its gameplay phase) from gameplay/events.
LongDistanceGoalNode
MatchStatsNode
Accumulates match-level stats and goal contexts; attaches per-goal territorial pressure at finish.
MovementNode
Tracks per-player movement classification/stats from player and vertical state during live play.
OneTimerGoalNode
OneTimerNode
Detects one-timers from ball state and upstream pass detection during live play.
OwnHalfGoalNode
PassNode
Detects passes from touches, backboard-bounce, and 50/50 state during live play.
PassingGoalNode
PlayerFrameStateNode
Exposes per-frame per-player state (positions/velocities/boost) from raw frame input.
PlayerPossessionNode
Tracks per-player possession from ball/player/possession/touch state.
PlayerVerticalStateNode
Tracks per-player airborne/vertical state derived from player frame state.
PositioningNode
Tracks per-player field positioning (thirds/halves/roles/proximity) from frame and possession state.
PossessionNode
Derives team/possession stats from ball-frame and shared possession state.
PossessionStateNode
Tracks current ball-possession state from touches and live-play state as shared state.
PowerslideNode
Detects powerslide usage from player frame state during live play.
RotationNode
Tracks rotational roles (first/second/third man) from positions and events during live play.
RushNode
Detects rushes/over-commits from ball/player/possession state during live play.
SettingsNode
Captures replay/match settings from replay metadata.
SpeedFlipNode
Detects speed-flips from gameplay/ball/player state during live play.
StatsProjectionNode
Folds every mechanic/state calculator’s events into per-frame cumulative stat accumulators.
StatsProjectionState
Aggregated per-stat accumulators forming the incremental stats projection.
StatsTimelineEventsNode
Collects mechanic/goal/state events from all calculators into a compact stats-timeline event stream.
StatsTimelineEventsState
Holds the collected replay stats-timeline events.
StatsTimelineFrameNode
Terminal materialization node for the full stats timeline frame export.
StatsTimelineFrameState
Holds the materialized per-frame stats snapshot DTO.
SustainedPressureGoalNode
TerritorialPressureNode
Tracks territorial pressure sessions from ball/possession state during live play.
TouchNode
Classifies ball touches (with rotation/possession/50-50/vertical context) into touch events/stats.
TouchStateNode
Detects raw ball touches per frame from ball/player state and frame events as shared state.
WallAerialNode
Detects wall aerials from ball/player positions and touches during live play.
WallAerialShotNode
Detects wall-aerial shots from player frame state and frame events during live play.
WavedashNode
Detects wavedashes from player frame state during live play.
WhiffNode
Detects whiffs and beaten-to-ball attempts from ball/player state and touches during live play.

Constants§

STATS_TIMELINE_MECHANIC_KINDS
List of mechanic kind identifiers emitted into the stats timeline.

Functions§

all_analysis_nodes
builtin_analysis_node_names
collect_analysis_graph_for_replay
collect_builtin_analysis_graph_for_replay
graph_with_all_analysis_nodes
graph_with_builtin_analysis_nodes