auc

Function auc 

pub fn auc(
    times: &[f64],
    values: &[f64],
    method: &AUCMethod,
) -> Result<f64, ObservationError>
Expand description

∫ C(t) dt from first to last time point. Tmax is auto-detected for LinLog.

§Example

use pharmsol::data::auc::auc;
use pharmsol::prelude::AUCMethod;

let times = [0.0, 1.0, 2.0, 4.0];
let concs = [0.0, 10.0, 8.0, 4.0];
let result = auc(&times, &concs, &AUCMethod::Linear).unwrap();
assert!((result - 26.0).abs() < 1e-10);