Module cache
Expand description
Cache mechanisms for [Equation]s
This module provides lightweight cache wrappers that can be embedded
directly in equation structs ([ODE], [Analytical], [SDE]).
Each equation instance owns a cache by default; cloning the equation
produces a shallow clone that shares the same cache data.
§Example
ⓘ
use pharmsol::*;
// Caching is enabled by default (100,000 entries):
let ode = ODE::new(diffeq, lag, fa, init, out);
// Custom cache capacity:
let ode = ODE::new(diffeq, lag, fa, init, out).with_cache_capacity(50_000);
// Disable caching:
let ode = ODE::new(diffeq, lag, fa, init, out).disable_cache();Structs§
- Prediction
Cache - Thread-safe LRU cache for subject predictions.
- SdeLikelihood
Cache - Cache for SDE likelihood values.
Constants§
- DEFAULT_
CACHE_ SIZE - Default maximum number of entries per cache.