data.root: Calculate the objective function value for a given (d, y)

View source: R/data.root.R

data.rootR Documentation

Calculate the objective function value for a given (d, y)

Description

Used by the DP recurrences to evaluate the stratification objective at a specific remaining distance 'd' and first-stratum width 'y', given stratum cost 'c' and constants tucked in 'my_env.'

Usage

data.root(d, y, c, my_env)

Arguments

d

numeric: remaining distance/range on the (scaled) axis

y

numeric: first stratum width on the (scaled) axis

c

numeric: per stratum cost multiplier (Ch[k])

my_env

environment: holds distribution name, parameters and scaling

Value

numeric: sqrt(objective) or -1 if branch is infeasible/invalid


stratifyR documentation built on Sept. 10, 2026, 5:07 p.m.