mod variant¶
- module variant¶
The fully-typed
SaVarianttuple satisfying L1-L4. SaVariant<T, O, C, N, M, A>: a typed tuple of the five IISE-manuscript components plus acheckedconstructor that asserts the four composition laws at instantiation.Types
- type BoltzmannVariant<O>¶
Type alias for the Boltzmann (BSA) preset:
(O, LogCool, ContinuousR_n, Gaussian, Metropolis).
- type FastVariant<O>¶
Type alias for the Fast (FSA) preset:
(O, ReciprocalCool, ContinuousR_n, Cauchy, Metropolis).
- type GsaVariant<O>¶
Type alias for the GSA preset:
(O, TsallisCool, ContinuousR_n, TsallisVisit, TsallisAccept).
Functions
- fn boltzmann<O: Objective<f64> + Send + Sync>(obj: O, t_init: f64, sigma: f64) -> Result<BoltzmannVariant<O>, LawViolation>¶
Constructs the Boltzmann SA variant: logarithmic cooling, isotropic Gaussian moves, Metropolis acceptance, on the unconstrained
R^dim.dimis read fromobj.dim().t_initis the initial temperature; the cooling decays asT_0 log(2) / log(k+2)(thek0 = 2choice matches the IISE manuscript Section 4 convention).sigmais the per-component Gaussian step size.
- fn fast<O: Objective<f64> + Send + Sync>(obj: O, t_init: f64, gamma: f64) -> Result<FastVariant<O>, LawViolation>¶
Constructs the Fast SA variant: reciprocal cooling, isotropic Cauchy moves, Metropolis acceptance, on the unconstrained
R^dim.
- fn gsa<O: Objective<f64> + Send + Sync>(obj: O, t_init: f64, q_v: f64, q_a: f64) -> Result<GsaVariant<O>, LawViolation>¶
Constructs the GSA variant: Tsallis cooling, Tsallis visit kernel, Tsallis acceptance, on the unconstrained
R^dim.q_v in (1, 3)is the visiting index;q_ais the acceptance index (q_a == 1collapses to Metropolis).
Traits
- trait CertifiedAcceptance<T: Float>¶
Acceptance rules whose implementations establish L3 and L4.
- trait CertifiedCooling<T: Float>¶
Cooling schedules whose parameter constructors establish L4.
- trait CertifiedMoveFor<T: Float, N: Neighborhood<T>>¶
Move/neighborhood pairs whose support compatibility is certified.
Functions
- fn certified_supports(&self, neigh: &N) -> bool¶
Confirms value-level requirements that the type pair cannot encode.
- trait CertifiedNeighborhood<T: Float>¶
Neighborhood relations whose implementations establish L1.
Enums
- enum SweepBudget¶
Sweep budget for
checked_with_sweep.Defaultruns 256 samples per law;Strictruns 4096.- Default¶
256 samples per law sweep (default proptest budget).
- Strict¶
4096 samples per law sweep, for strict correctness checks.
- Custom(usize)¶
Custom sample count.
Implementations
- impl SweepBudget¶
- enum ValidationEvidence¶
Provenance for the component-law status of a variant.
- Certified¶
Shipped component types and their pairing satisfy structural contracts.
- Sampled¶
Executable laws were sampled over the recorded validation domain.
- samples_per_law: usize¶
Number of samples requested per executable law.
- dim: usize¶
Dimension of sampled position vectors.
- bound: f64¶
Half-width of the sampled validation cube.
- seed: u64¶
Seed controlling all law samples.
- Unchecked¶
No component-law validation was performed.
Structs and Unions
-
struct SaVariant<T, O, C, N, M, A>¶
where
T: Float,
O: Objective<T>,
C: Cooling<T>,
N: Neighborhood<T>,
M: MoveKernel<T>,
A: AcceptRule<T>
¶ A fully-typed SA variant: an
(Obj, Cool, Neigh, Move, Accept)tuple satisfying the IISE-manuscript composition laws L1-L4.- obj: O¶
The objective.
- cool: C¶
The cooling schedule.
- neigh: N¶
The neighborhood relation.
- mover: M¶
The move kernel.
- accept: A¶
The acceptance rule.
- validation: ValidationEvidence¶
Evidence supporting this tuple’s component-law status.
Implementations
-
impl<T, O, C, N, M, A> SaVariant<T, O, C, N, M, A>¶
where
T: Float,
O: Objective<T>,
C: Cooling<T>,
N: Neighborhood<T>,
M: MoveKernel<T>,
A: AcceptRule<T>
¶ Functions
-
fn checked(obj: O, cool: C, neigh: N, mover: M, accept: A) -> Result<Self, LawViolation>¶
where
C: CertifiedCooling<T>,
N: CertifiedNeighborhood<T>,
M: CertifiedMoveFor<T, N>,
A: CertifiedAcceptance<T>
¶ Constructs a variant from component types certified for L1-L4. Third-party components use
Self::checked_with_sweepinstead.
- fn unchecked(obj: O, cool: C, neigh: N, mover: M, accept: A) -> Self¶
Constructs a tuple without validating L1-L4.
This is intended for negative tests and research prototypes. Results produced through this constructor are excluded from certified-component claims.
-
fn checked(obj: O, cool: C, neigh: N, mover: M, accept: A) -> Result<Self, LawViolation>¶
-
impl<T, O, C, N, M, A> SaVariant<T, O, C, N, M, A>¶
where
T: Float,
O: Objective<T>,
C: Cooling<T> + Cooling<f64>,
N: Neighborhood<T> + Neighborhood<f64>,
M: MoveKernel<T> + MoveKernel<f64>,
A: AcceptRule<T> + AcceptRule<f64>
¶ Functions
- fn checked_with_sweep(obj: O, cool: C, neigh: N, mover: M, accept: A, budget: SweepBudget, dim: usize, bound: f64, seed: u64) -> Result<Self, LawViolation>¶
Like
checked, but additionally runs randomised property sweeps overaccept(L3 downhill, L4 temp-monotone),cool(L4 epoch-monotone), andneigh(L1 symmetry) before returning.dimandboundparameterise the L1 neighbourhood sweep over[-bound, bound]^dim.seedmakes the sweep reproducible.The randomized sweep checks the executable law behavior rather than trusting witness methods alone.