Last active
August 29, 2015 14:04
-
-
Save kartikkukreja/ee8671b8ab5c647f5252 to your computer and use it in GitHub Desktop.
Segmented Least Squares Problem
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OPT[0] = 0 | |
for j = 1 to n: | |
for i = 1 to j: | |
compute e(i, j) for the segment pi, pi+1, ..., pj | |
for j = 1 to n: | |
OPT(j) = min((e(i,j) + C + OPT[i-1]) forall 1 ≤ i ≤ j) | |
return OPT[n] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment