pub struct AttractorDynamics {
pub experience_id: ExperienceId,
pub strength: f32,
pub radius: f32,
pub warp_factor: f32,
}Expand description
Attractor dynamics for a single experience — its gravitational properties in embedding space.
Computed at query time from experience fields (not pre-stored).
Fields§
§experience_id: ExperienceIdExperience this attractor represents.
strength: f32Combined strength: importance * confidence * reinforcement.
radius: f32Influence radius in embedding space (cosine distance).
warp_factor: f32How strongly this attractor pulls nearby queries.
Implementations§
Source§impl AttractorDynamics
impl AttractorDynamics
Sourcepub fn from_experience(exp: &Experience, config: &AttractorConfig) -> Self
pub fn from_experience(exp: &Experience, config: &AttractorConfig) -> Self
Compute attractor dynamics from an experience’s fields.
Strength formula: importance * confidence * (1 + applications * reinforcement_boost)
Sourcepub fn influence_at(
&self,
query_embedding: &[f32],
experience_embedding: &[f32],
) -> f32
pub fn influence_at( &self, query_embedding: &[f32], experience_embedding: &[f32], ) -> f32
Compute the influence of this attractor on a query at the given position.
Returns 0.0 if the query is beyond the attractor’s radius.
Returns strength * warp_factor at distance 0.0.
Linear falloff between 0 and radius.
Trait Implementations§
Source§impl Clone for AttractorDynamics
impl Clone for AttractorDynamics
Source§fn clone(&self) -> AttractorDynamics
fn clone(&self) -> AttractorDynamics
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AttractorDynamics
impl RefUnwindSafe for AttractorDynamics
impl Send for AttractorDynamics
impl Sync for AttractorDynamics
impl Unpin for AttractorDynamics
impl UnsafeUnpin for AttractorDynamics
impl UnwindSafe for AttractorDynamics
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more