Trait subtr_actor::collector::ndarray::PlayerFeatureAdder
source · pub trait PlayerFeatureAdder<F> {
// Required methods
fn get_column_headers(&self) -> &[&str];
fn add_features(
&self,
player_id: &PlayerId,
processor: &ReplayProcessor<'_>,
frame: &Frame,
frame_count: usize,
current_time: f32,
vector: &mut Vec<F>
) -> SubtrActorResult<()>;
// Provided method
fn features_added(&self) -> usize { ... }
}
Expand description
This trait acts as an abstraction over a player-specific feature adder, and
is primarily used to allow for heterogeneous collections of player feature
adders in the NDArrayCollector
. While it provides methods for adding
player-specific features and retrieving column headers, it is generally
recommended to implement the LengthCheckedPlayerFeatureAdder
trait
instead, which provides compile-time guarantees about the number of features
returned.