pub enum RadialStrategy {
Fixed(f64),
Magnitude,
MagnitudeTransform(Arc<dyn Fn(f64) -> f64 + Send + Sync>),
ProjectionMagnitude,
Certainty {
scale: f64,
},
Custom(Arc<dyn Fn(&RadialContext) -> f64 + Send + Sync>),
}Expand description
Controls how the radial coordinate r is computed from an embedding.
The angular coordinates (theta, phi) always encode semantic direction.
The radial coordinate is free to encode magnitude, fidelity, or a
caller-defined function of any per-point signal the projection exposes
via RadialContext.
Variants§
Fixed(f64)
Constant radius for all projections.
Magnitude
r = L2 magnitude of the raw (pre-normalization) embedding. Encodes embedding “confidence” or specificity. Degenerates to a constant when inputs are L2-normalized — pick one of the projection-side variants below in that case.
MagnitudeTransform(Arc<dyn Fn(f64) -> f64 + Send + Sync>)
r = f(embedding_magnitude). Apply a custom transform to the pre-normalization magnitude (e.g. log scaling, clamping).
ProjectionMagnitude
r = ‖(x, y, z)‖ — how much of the input variance landed in the projected 3-vector. Universal across all four projection families. Recommended starting point for normalized embeddings.
Certainty
r = scale * certainty, where certainty ∈ [0, 1] is the
projection-supplied per-point fidelity score. Higher r ⇒ this
point is well-explained by the 3D projection.
Custom(Arc<dyn Fn(&RadialContext) -> f64 + Send + Sync>)
r = f(&context). Escape hatch for arbitrary per-point logic over
any combination of the RadialContext signals.
Implementations§
Source§impl RadialStrategy
impl RadialStrategy
Sourcepub fn compute_rich(&self, ctx: &RadialContext) -> f64
pub fn compute_rich(&self, ctx: &RadialContext) -> f64
Resolve r against the full per-point context. All four projection
families construct a RadialContext inline and call this.
Sourcepub fn compute(&self, magnitude: f64) -> f64
pub fn compute(&self, magnitude: f64) -> f64
Backward-compatible shim. Use Self::compute_rich when
projection-side context is available — the new ProjectionMagnitude,
Certainty, and Custom variants only do something useful there.
Trait Implementations§
Source§impl Clone for RadialStrategy
impl Clone for RadialStrategy
Source§impl Debug for RadialStrategy
impl Debug for RadialStrategy
Source§impl Default for RadialStrategy
impl Default for RadialStrategy
Source§fn default() -> RadialStrategy
fn default() -> RadialStrategy
Auto Trait Implementations§
impl !RefUnwindSafe for RadialStrategy
impl !UnwindSafe for RadialStrategy
impl Freeze for RadialStrategy
impl Send for RadialStrategy
impl Sync for RadialStrategy
impl Unpin for RadialStrategy
impl UnsafeUnpin for RadialStrategy
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
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>
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>
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