Skip to main content

Module cache

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§

BoundErrorModelCache
Cache for equation-bound assay error models.
PredictionCache
Thread-safe bounded cache for subject predictions.
SdeLikelihoodCache
Cache for SDE likelihood values.

Constants§

DEFAULT_BOUND_ERROR_MODEL_CACHE_SIZE
Default maximum number of cached bound assay-error contexts per equation.
DEFAULT_CACHE_SIZE
Default maximum number of entries per cache.