hupdate

Function hupdate 

Source
pub fn hupdate(
    r: usize,
    theta: f64,
    info: f64,
    a: f64,
    b: f64,
    theta_prev: f64,
    info_prev: f64,
    prev: &DensityGrid,
) -> Result<DensityGrid, IntegrationError>
Expand description

Update the density grid for a subsequent group sequential analysis.

The update performs a convolution step using the canonical drift parameters and information levels at two successive analyses.

§Errors

Returns IntegrationError::NonPositivePreviousInformation when the prior information is not strictly positive, IntegrationError::NonIncreasingInformation when the current information fails to exceed the previous value, or propagates any IntegrationError produced by gridpts.

§Examples

use gsdesign::{h1, hupdate, IntegrationError};

let first = h1(5, 0.3, 1.5, -2.0, 2.0)?;
let second = hupdate(5, 0.5, 2.5, -2.0, 2.0, 0.3, 1.5, &first)?;
assert_eq!(second.points.len(), second.values.len());