pub struct SourceContributionV1 {
pub axis: InputAxis,
pub sigma: f64,
pub d_drop_d_x: f64,
pub d_windage_d_x: f64,
pub scheme: DifferenceScheme,
pub variance_share: f64,
pub ellipse_area_reduction_m2: f64,
pub p_hit_gain_if_perfect: Option<f64>,
}Expand description
One declared source’s contribution to impact variance at one range.
Constructed only for a source central_difference actually evaluated – an axis it refused
is recorded in UnavailableSourceV1 instead, never here with a fabricated zero.
Fields§
§axis: InputAxis§sigma: f64The caller-declared one-sigma uncertainty for this axis, in the axis’s own physical unit
(crate::perturbation::axis_meta(axis).kind).
d_drop_d_x: f64§d_windage_d_x: f64§scheme: DifferenceSchemeWhich finite-difference scheme produced the two derivatives above. A one-sided scheme
(ForwardOneSided/BackwardOneSided) has larger truncation error than Central – see
this module’s “Unavailable sources” doc section and DifferenceScheme’s own doc for
when the kernel falls back to one. Still air (wind.speed_mps: 0.0) is the ordinary,
ROUTINE case for WindSpeed, not an exotic one – wind-call uncertainty is this report’s
flagship use case, so a non-Central scheme here is expected, not a warning sign by
itself.
Fraction of total impact variance (sigma_drop_m^2 + sigma_windage_m^2) attributable to
this source. Sums to 1.0 across a row’s sources whenever at least one source has a
nonzero contribution.
ellipse_area_reduction_m2: f64Reduction in the row’s 95% ellipse area if this source alone were measured perfectly
(its sigma set to zero, every other source unchanged). Always >= 0.0.
Degenerate with two or fewer sources. The remaining covariance after removing any ONE
of exactly two declared sources is an outer product (rank <= 1, area exactly 0 – see
Symmetric2::largest_smallest_eigenvalues’s doc for why that is normal, not a
bug), so with exactly two sources BOTH report a reduction equal to the FULL ellipse area,
even when one dominates the variance share overwhelmingly (e.g. a 99%/1% split). That is
literally true (perfecting either one alone does leave a zero-area ellipse) but reads, next
to a ranking, as a tie where none exists on variance_share. A declaration of two sources
(e.g. muzzle velocity and wind call, the most likely pair this ticket sees) always has this
property; prefer variance_share to distinguish sources when sources.len() <= 2. With
three or more sources the reduction is generically discriminating.
p_hit_gain_if_perfect: Option<f64>The hit-probability gain over the row’s target if THIS source alone were measured
perfectly (its sigma set to zero, every other source unchanged), i.e.
p_hit(without this source) - p_hit(with every declared source). Some exactly when
error_budget_with_target was given a target; None (never a fabricated 0.0) when
no target was supplied, matching ErrorBudgetRowV1::p_hit.
Always >= 0.0 (see p_hit_bivariate’s doc: shrinking a target-centred impact
covariance in the Loewner order cannot reduce the mass of a symmetric normal over a
symmetric convex target – Anderson’s theorem). The unclamped value is checked against a
small negative tolerance before being clamped to zero (a debug_assert! in
error_budget_with_target), so a bug that made it SYSTEMATICALLY negative – as
opposed to a few ULP of quadrature noise – fails a debug/test build loudly rather than
being silently laundered into 0.0.
Does NOT share ellipse_area_reduction_m2’s two-source degeneracy above – it is one of
the few fields on this type that DOES discriminate at sources.len() == 2, the
muzzle-velocity/wind-call pair this ticket names as the most likely declaration. The
ellipse-area field is degenerate there because AREA is exactly zero for ANY rank-1
covariance, blind to which specific rank-1 covariance it is – removing either of two
sources leaves a different rank-1 covariance (one source’s own outer product, not the
other’s), but both have zero area, so both report the same “full area” reduction
regardless of the real variance split. Hit probability is not blind that way: it depends
on the SHAPE of the remaining rank-1 covariance (which is oriented along the surviving
source’s own (d_drop_d_x, d_windage_d_x) direction), not merely on whether it is
singular. On this module’s own flagship two-source fixture (MuzzleVelocityMps +
WindSpeed, resolved(), range 600 m, target 0.5 m x 0.75 m), measured
p_hit_gain_if_perfect values are ~0.4416 (perfecting WindSpeed, which nearly
dominates windage) and ~0.00008 (perfecting MuzzleVelocityMps) – a difference of
three and a half orders of magnitude, not a tie. See
p_hit_gain_if_perfect_discriminates_with_only_two_sources in this module’s tests.
Trait Implementations§
Source§impl Clone for SourceContributionV1
impl Clone for SourceContributionV1
Source§fn clone(&self) -> SourceContributionV1
fn clone(&self) -> SourceContributionV1
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SourceContributionV1
impl Debug for SourceContributionV1
Source§impl<'de> Deserialize<'de> for SourceContributionV1
impl<'de> Deserialize<'de> for SourceContributionV1
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for SourceContributionV1
impl PartialEq for SourceContributionV1
Source§impl Serialize for SourceContributionV1
impl Serialize for SourceContributionV1
impl StructuralPartialEq for SourceContributionV1
Auto Trait Implementations§
impl Freeze for SourceContributionV1
impl RefUnwindSafe for SourceContributionV1
impl Send for SourceContributionV1
impl Sync for SourceContributionV1
impl Unpin for SourceContributionV1
impl UnsafeUnpin for SourceContributionV1
impl UnwindSafe for SourceContributionV1
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.