pub struct VisualPredictor { /* private fields */ }Expand description
Visual state predictor
Implementations§
Source§impl VisualPredictor
impl VisualPredictor
Sourcepub fn new(config: PredictionConfig) -> Self
pub fn new(config: PredictionConfig) -> Self
Create a new predictor
Sourcepub fn update(&mut self, state: VisualState)
pub fn update(&mut self, state: VisualState)
Update with a new received state
Sourcepub fn current_state(&self) -> Option<&VisualState>
pub fn current_state(&self) -> Option<&VisualState>
Get the current best state (received or predicted)
Sourcepub fn predict(&mut self, target_time: StateTime) -> Option<VisualState>
pub fn predict(&mut self, target_time: StateTime) -> Option<VisualState>
Predict state at a future time Returns None if prediction is not possible or confidence is too low
Sourcepub fn is_predicting(&self) -> bool
pub fn is_predicting(&self) -> bool
Check if we’re currently in prediction mode
Sourcepub fn prediction_count(&self) -> u32
pub fn prediction_count(&self) -> u32
Get prediction count
Sourcepub fn confidence(&self) -> f32
pub fn confidence(&self) -> f32
Get estimated confidence of current state
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VisualPredictor
impl RefUnwindSafe for VisualPredictor
impl Send for VisualPredictor
impl Sync for VisualPredictor
impl Unpin for VisualPredictor
impl UnsafeUnpin for VisualPredictor
impl UnwindSafe for VisualPredictor
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