pub struct TrajectoryTracker {
pub transitions: TransitionMap,
/* private fields */
}Fields§
§transitions: TransitionMapImplementations§
Source§impl TrajectoryTracker
impl TrajectoryTracker
pub fn new(max_turns: usize) -> Self
pub fn record_turn(&mut self, turn: TrajectoryNode)
pub fn get_trajectory(&self) -> &[TrajectoryNode]
pub fn get_resume_context(&self) -> Option<String>
pub fn predict_next_topics(&self) -> Vec<String>
Sourcepub fn reinforce_transition(&mut self, hit_topic: &str)
pub fn reinforce_transition(&mut self, hit_topic: &str)
Called when the speculative cache gets a hit. Reinforces the transition from the previous topic to the hit topic.
Sourcepub fn decay_transition(&mut self, predicted_topic: &str)
pub fn decay_transition(&mut self, predicted_topic: &str)
Called when the speculative cache misses. Slightly decays the transition from the previous topic to the predicted topic.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TrajectoryTracker
impl RefUnwindSafe for TrajectoryTracker
impl Send for TrajectoryTracker
impl Sync for TrajectoryTracker
impl Unpin for TrajectoryTracker
impl UnsafeUnpin for TrajectoryTracker
impl UnwindSafe for TrajectoryTracker
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