Compute the monotone cost,
Arguments
- x
numeric vector representing the density of a histogram
- s
numeric vector representing initial segmentation indices
- eps
numeric hyperparameter epsilon used to scale the resolution of segmentation
- increasing
logical, whether the Grenander estimator should assume x is increasing or decreasing