pub struct FeatureEngine { /* private fields */ }Expand description
Feature calculation engine that manages multiple features
Implementations§
Source§impl FeatureEngine
impl FeatureEngine
Sourcepub fn new(mode: CalculationMode) -> Self
pub fn new(mode: CalculationMode) -> Self
Creates a new FeatureEngine with the given calculation mode.
Sourcepub fn add_feature(&mut self, name: String, feature: Box<dyn DualModeFeature>)
pub fn add_feature(&mut self, name: String, feature: Box<dyn DualModeFeature>)
Add a feature calculator
Sourcepub fn process_update(
&mut self,
update: &MarketUpdate,
) -> FxHashMap<String, FeatureValue>
pub fn process_update( &mut self, update: &MarketUpdate, ) -> FxHashMap<String, FeatureValue>
Process market update (real-time mode)
Sourcepub fn process_batch(
&self,
data: &[MarketData],
) -> FxHashMap<String, Vec<FeatureValue>>
pub fn process_batch( &self, data: &[MarketData], ) -> FxHashMap<String, Vec<FeatureValue>>
Process batch data (batch mode)
Sourcepub fn switch_mode(&mut self, mode: CalculationMode)
pub fn switch_mode(&mut self, mode: CalculationMode)
Switch calculation mode
Sourcepub fn get_cached_results(&self) -> FxHashMap<String, Vec<FeatureValue>>
pub fn get_cached_results(&self) -> FxHashMap<String, Vec<FeatureValue>>
Get cached results
Auto Trait Implementations§
impl Freeze for FeatureEngine
impl !RefUnwindSafe for FeatureEngine
impl Send for FeatureEngine
impl Sync for FeatureEngine
impl Unpin for FeatureEngine
impl !UnwindSafe for FeatureEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more