pub trait ProcessIntegrandImpl {
type G: GraphTerm;
Show 35 methods
// Required methods
fn warm_up(&mut self, model: &Model) -> Result<()>;
fn get_rotations(&self) -> impl Iterator<Item = &Rotation>;
fn increment_loop_cache_id(&mut self, val: usize);
fn loop_cache_id(&self) -> usize;
fn increment_external_cache_id(&mut self, val: usize);
fn external_cache_id(&self) -> usize;
fn revert_to_base_external_cache_id(&mut self);
fn get_base_external_cache_id(&self) -> usize;
fn get_group_masters(&self) -> impl Iterator<Item = &Self::G>;
fn get_terms_mut(&mut self) -> impl Iterator<Item = &mut Self::G>;
fn graph_count(&self) -> usize;
fn get_settings(&self) -> &RuntimeSettings;
fn get_master_graph(&self, group_id: GroupId) -> &Self::G;
fn get_graph(&self, graph_id: usize) -> &Self::G;
fn get_graph_mut(&mut self, graph_id: usize) -> &mut Self::G;
fn graph_group_id_for_graph(&self, graph_id: usize) -> Option<usize>;
fn get_group(&self, group_id: GroupId) -> &GraphGroup;
fn get_group_structure(&self) -> &TiVec<GroupId, GraphGroup>;
fn get_dependent_momenta_constructor(
&self,
) -> DependentMomentaConstructor<'_>;
// Provided methods
fn stability_reference_scale<T: FloatLike>(
&self,
graph_id: usize,
sample: &MomentumSample<T>,
missing_measure_dimension: i32,
) -> Result<F<T>> { ... }
fn sampling_source_policy(&self) -> Result<(SamplingPrecision, f64)> { ... }
fn warm_up_sampling(&mut self) -> Result<()> { ... }
fn prepare_sampling_precision<T: FloatLike>(&mut self) -> Result<()> { ... }
fn signal_external_momenta_changed(&mut self) { ... }
fn get_current_external_cache_id(&self) -> usize { ... }
fn is_external_caching_beneficial(&self) -> bool { ... }
fn debug_cache_state(&self, context: &str) { ... }
fn validate_cache_consistency(&self) -> CacheValidationResult { ... }
fn get_cache_stats(&self) -> CacheStats { ... }
fn take_event_processing_runtime(
&mut self,
) -> Option<EventProcessingRuntime> { ... }
fn restore_event_processing_runtime(
&mut self,
_runtime: Option<EventProcessingRuntime>,
) { ... }
fn event_processing_runtime(&self) -> Option<&EventProcessingRuntime> { ... }
fn event_processing_runtime_mut(
&mut self,
) -> Option<&mut EventProcessingRuntime> { ... }
fn groups_default_sample_events_by_graph_group(&self) -> bool { ... }
fn uses_explicit_orientation_sum_only(&self) -> bool { ... }
}Required Associated Types§
Required Methods§
fn warm_up(&mut self, model: &Model) -> Result<()>
fn get_rotations(&self) -> impl Iterator<Item = &Rotation>
fn increment_loop_cache_id(&mut self, val: usize)
fn loop_cache_id(&self) -> usize
fn increment_external_cache_id(&mut self, val: usize)
fn external_cache_id(&self) -> usize
Sourcefn revert_to_base_external_cache_id(&mut self)
fn revert_to_base_external_cache_id(&mut self)
Revert to the base external cache ID for the current configuration
This allows new samples to reuse the base cache ID when they represent the same underlying external momenta configuration (e.g., after rotations)
§Usage
Call this method when you want to create a new sample that represents the same base external momenta configuration as before, allowing reuse of cached polarizations and other external-dependent computations.
§Example Cache Flow
1. Initial sample: cache_id = 0, base_cache_id = 0
2. Rotation 1: cache_id = 1, base_cache_id = 0
3. Rotation 2: cache_id = 2, base_cache_id = 0
4. revert_to_base(): cache_id = 0, base_cache_id = 0 // Reuse cache!
5. signal_changed(): cache_id = 3, base_cache_id = 3 // New base config
6. Rotation of new config: cache_id = 4, base_cache_id = 3
7. revert_to_base(): cache_id = 3, base_cache_id = 3 // Reuse new baseSourcefn get_base_external_cache_id(&self) -> usize
fn get_base_external_cache_id(&self) -> usize
Get the base external cache ID for the current configuration
fn get_group_masters(&self) -> impl Iterator<Item = &Self::G>
fn get_terms_mut(&mut self) -> impl Iterator<Item = &mut Self::G>
fn graph_count(&self) -> usize
fn get_settings(&self) -> &RuntimeSettings
fn get_master_graph(&self, group_id: GroupId) -> &Self::G
fn get_graph(&self, graph_id: usize) -> &Self::G
fn get_graph_mut(&mut self, graph_id: usize) -> &mut Self::G
fn graph_group_id_for_graph(&self, graph_id: usize) -> Option<usize>
fn get_group(&self, group_id: GroupId) -> &GraphGroup
fn get_group_structure(&self) -> &TiVec<GroupId, GraphGroup>
fn get_dependent_momenta_constructor(&self) -> DependentMomentaConstructor<'_>
Provided Methods§
Sourcefn stability_reference_scale<T: FloatLike>(
&self,
graph_id: usize,
sample: &MomentumSample<T>,
missing_measure_dimension: i32,
) -> Result<F<T>>
fn stability_reference_scale<T: FloatLike>( &self, graph_id: usize, sample: &MomentumSample<T>, missing_measure_dimension: i32, ) -> Result<F<T>>
Natural E_cm scale of the returned physical quantity. Custom graphs declare their integrated energy dimension; raw inputs omit spatial measure.
Sourcefn sampling_source_policy(&self) -> Result<(SamplingPrecision, f64)>
fn sampling_source_policy(&self) -> Result<(SamplingPrecision, f64)>
Choose the complete numerical proposal before any draw or physical retry. This conservative admission floor is not a pointwise map-error bound; density/root checks still fail explicitly when the fixed law is unresolved.
Sourcefn warm_up_sampling(&mut self) -> Result<()>
fn warm_up_sampling(&mut self) -> Result<()>
Compile fixed graph geometry after process warmup has prepared masses and improved externals. Publish only when the fixed canonical precision has every bridge valid. Native bindings remain available for component diagnostics; they do not define physical retry proposals. Radial roots and conditional cut contexts remain point-dependent runtime data. A failed canonical binding invalidates the epoch.
Sourcefn prepare_sampling_precision<T: FloatLike>(&mut self) -> Result<()>
fn prepare_sampling_precision<T: FloatLike>(&mut self) -> Result<()>
Bind a configured or explicitly requested precision once per warmup epoch, retaining typed numerical failures as well as successes. Programs and canonical IDs are reused; geometry comes from the same native improved external data consumed by physical evaluation. Worker clones own their evaluator buffers, and a precision request never reparses metadata.
Sourcefn signal_external_momenta_changed(&mut self)
fn signal_external_momenta_changed(&mut self)
Signal that external momenta configuration has actually changed This increments the external cache ID to invalidate cached computations
§Usage
Call this method when:
- You change the external momenta values in your Monte Carlo sampling
- You switch to a different kinematic configuration
- You want to force recomputation of cached polarizations/external quantities
§Example
// When you change external momenta in your sampling
integrand.signal_external_momenta_changed();
let new_sample = parameterize(&sample_point, &mut integrand, &mut first_draw_metadata)?;
// Rotations will automatically get new cache IDs
let rotated_samples = evaluate_all_rotations(&new_sample, &mut integrand, true)?;
// Next iteration - revert to base configuration to reuse cache
integrand.revert_to_base_external_cache_id();
let next_sample = parameterize(&next_sample_point, &mut integrand, &mut next_draw_metadata)?;Sourcefn get_current_external_cache_id(&self) -> usize
fn get_current_external_cache_id(&self) -> usize
Get the current external cache ID for reuse (doesn’t increment)
This returns the current cache ID without incrementing it, allowing new samples to reuse cached computations for the same external momenta configuration.
Sourcefn is_external_caching_beneficial(&self) -> bool
fn is_external_caching_beneficial(&self) -> bool
Check if external momenta caching is beneficial
Returns true if the same external cache ID has been used multiple times, indicating that caching is providing benefits.
Sourcefn debug_cache_state(&self, context: &str)
fn debug_cache_state(&self, context: &str)
Force a cache consistency check with detailed reporting
Sourcefn validate_cache_consistency(&self) -> CacheValidationResult
fn validate_cache_consistency(&self) -> CacheValidationResult
Validate cache ID consistency and return diagnostics
Sourcefn get_cache_stats(&self) -> CacheStats
fn get_cache_stats(&self) -> CacheStats
Get cache usage statistics for monitoring
fn take_event_processing_runtime(&mut self) -> Option<EventProcessingRuntime>
fn restore_event_processing_runtime( &mut self, _runtime: Option<EventProcessingRuntime>, )
fn event_processing_runtime(&self) -> Option<&EventProcessingRuntime>
fn event_processing_runtime_mut( &mut self, ) -> Option<&mut EventProcessingRuntime>
fn groups_default_sample_events_by_graph_group(&self) -> bool
fn uses_explicit_orientation_sum_only(&self) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".