Expand description
Fugue Handlers and operation hooks for evolutionary operators
This module contains two distinct kinds of type:
-
Genuine [
fugue::Handler] implementations (TraceScoringHandler,RecordingHandler). These implement Fugue’s real effect-handler contract (on_sample_*→log_prior,on_observe_*→log_likelihood,on_factor→log_factors,finish→ [Trace]) and can therefore be driven with [fugue::runtime::handler::run] to score or replay a model with correct log-weight bookkeeping.TraceScoringHandleris the handler thatcrate::inference::model::EvolutionModeluses to injectfactor(β·f(x))into a genome’s trace. -
Operation hooks (
LoggingHook,RateLimitingHook,ConditionalHook, …). These are not Fugue handlers — they are plain before/after callbacks used to observe, log, or rate-limit the trace-based genetic operators insuper::trace_operators. They do not participate in probabilistic scoring; the probability mass of an operator result is obtained by scoring it withTraceScoringHandler(or withcrate::inference::model::EvolutionModel::to_weighted_trace).
Structs§
- Composed
Crossover Hook - Composition of multiple crossover hooks
- Composed
Mutation Hook - Composition of multiple mutation hooks
- Conditional
Hook - A hook that conditionally blocks operations based on a predicate
- Crossover
Record - Record of a crossover operation
- Logging
Hook - A hook that logs all evolutionary operations
- Mutation
Record - Record of a mutation operation
- Operation
Statistics - Statistics computed from hook records
- Rate
Limiting Hook - A hook that rate-limits operations
- Recording
Handler - A genuine [
fugue::Handler] that records the sequence of sampled sites while delegating all effect handling (and therefore all log-weight bookkeeping) to an inner handler. - Selection
Record - Record of a selection operation
- Trace
Scoring Handler - A genuine [
fugue::Handler] that scores a fixed trace of choices.
Traits§
- Crossover
Hook - Operation hook for the trace-based crossover operator.
- Mutation
Hook - Operation hook for the trace-based mutation operator.
- Selection
Hook - Operation hook for a selection operator.
Functions§
- hooked_
crossover_ traces - Hooked crossover operator that integrates with operation hooks.
- hooked_
mutate_ trace - Hooked mutation operator that integrates with operation hooks.