diff --git a/examples/analytical_readme.rs b/examples/analytical_readme.rs index f66dff00..8116244a 100644 --- a/examples/analytical_readme.rs +++ b/examples/analytical_readme.rs @@ -1,3 +1,6 @@ +//! This example showcases the use of the `analytical!` macro to define a simple one-compartment model with first-order absorption, +//! and the basic workflow of creating a subject, defining parameters, and estimating predictions. + fn main() -> Result<(), pharmsol::PharmsolError> { use pharmsol::{prelude::*, Parameters}; diff --git a/examples/covariates.rs b/examples/covariates.rs index cec07579..c29569b9 100644 --- a/examples/covariates.rs +++ b/examples/covariates.rs @@ -1,3 +1,9 @@ +//! Demonstrates time-varying covariates that scale parameters in an ODE model. +//! +//! This example defines a one-compartment oral absorption model where the +//! elimination rate `ke` is dynamically scaled by creatinine and age covariates. +//! It also shows lag-time handling and repeated dosing via the `ode!` macro. + fn main() { use pharmsol::{prelude::*, Parameters}; diff --git a/examples/dsl_jit_analytical_covariates.rs b/examples/dsl_jit_analytical_covariates.rs index bd45e4bd..b0244dd8 100644 --- a/examples/dsl_jit_analytical_covariates.rs +++ b/examples/dsl_jit_analytical_covariates.rs @@ -1,3 +1,10 @@ +//! Demonstrates JIT compilation of an analytical model from DSL source text, +//! compared against the equivalent `analytical!` macro. +//! +//! A one-compartment oral model with weight-based covariate scaling is defined +//! both as a DSL string (compiled at runtime) and as a declarative macro. +//! Predictions from both paths are printed side by side to verify parity. +//! //! Run with: //! cargo run --example dsl_jit_analytical_covariates --features dsl-jit diff --git a/examples/dsl_runtime_jit.rs b/examples/dsl_runtime_jit.rs index ef40078d..bf99e0d0 100644 --- a/examples/dsl_runtime_jit.rs +++ b/examples/dsl_runtime_jit.rs @@ -1,3 +1,9 @@ +//! Demonstrates JIT compilation of an ODE model from DSL source text. +//! +//! A simple one-compartment IV infusion model is defined as a DSL string, +//! compiled at runtime via `compile_module_source_to_runtime`, and then used +//! to estimate predictions — no recompilation of the host binary needed. +//! //! Run with: //! cargo run --example dsl_runtime_jit --features dsl-jit diff --git a/examples/ode_readme.rs b/examples/ode_readme.rs index e01aee33..49d3f084 100644 --- a/examples/ode_readme.rs +++ b/examples/ode_readme.rs @@ -1,3 +1,8 @@ +//! Shows the minimal ODE workflow with the `ode!` macro. +//! +//! Defines a one-compartment IV infusion model, creates a subject with +//! missing observations, sets named parameters, and estimates predictions. + fn main() -> Result<(), pharmsol::PharmsolError> { use pharmsol::prelude::*; diff --git a/examples/one_compartment.rs b/examples/one_compartment.rs index 27e33f19..e1daa2c3 100644 --- a/examples/one_compartment.rs +++ b/examples/one_compartment.rs @@ -1,3 +1,9 @@ +//! Compares analytical and ODE solutions for a one-compartment IV model. +//! +//! Both the `analytical!` and `ode!` macros define the same model. Predictions +//! and log-likelihoods are computed with each and printed side by side to +//! confirm they match. + fn main() -> Result<(), pharmsol::PharmsolError> { use pharmsol::{prelude::*, Parameters}; diff --git a/examples/sde_readme.rs b/examples/sde_readme.rs index ceb3186b..1d1e0e54 100644 --- a/examples/sde_readme.rs +++ b/examples/sde_readme.rs @@ -1,3 +1,9 @@ +//! Shows the minimal SDE workflow with the `sde!` macro. +//! +//! Defines a one-compartment IV infusion model with diffusion noise on the +//! central compartment, creates a subject, sets named parameters, and +//! estimates predictions using particle-based simulation. + fn main() -> Result<(), pharmsol::PharmsolError> { use pharmsol::{prelude::*, Parameters};