get_complexity_best_optimal_cost function

get complexity best optimal cost

get complexity best optimal cost

Dynamic programming for computing lower bound on number of split candidates to compute / best case of binary segmentation. The dynamic programming recursion is on f(d,s) = best number of splits for segment of size s which is split d times. Need to optimize f(d,s) = g(s) + min f(d1,s1) + f(d2,s2) over s1,d1 given that s1+s2=s, d1+d2+1=d, and g(s) is the number of splits for segment of size s.

get_complexity_best_optimal_cost(N.data, min.segment.length = 1L, n.segments = NULL)

Arguments

  • N.data: positive integer number of data.
  • min.segment.length: positive integer min segment length.
  • n.segments: positive integer number of segments.

Returns

data table with one row for each f(d,s) value computed.

Author(s)

Toby Dylan Hocking

Examples

binsegRcpp::get_complexity_best_optimal_cost( N.data = 19L, min.segment.length = 3L, n.segments = 4L)
  • Maintainer: Toby Dylan Hocking
  • License: GPL-3
  • Last published: 2023-09-06