Thanks for sharing this implementation. I'm reading through to understand the algorithm while also reading the original thesis, and something jumped out. The idea is to compute the triangle areas with the previous bucket point, each of the candidate points in the current bucket, and the average of the points in the next bucket. I was expecting to see some kind of looping or iteration over the next bucket to compute the average, but it looks like you are just dividing a single value by the bucket length. Kind of surprising that this still produces a reasonable value, but I guess maybe it shows how the algorithm isn't so sensitive to that 3rd point in the triangle.
Thanks for sharing this implementation. I'm reading through to understand the algorithm while also reading the original thesis, and something jumped out. The idea is to compute the triangle areas with the previous bucket point, each of the candidate points in the current bucket, and the average of the points in the next bucket. I was expecting to see some kind of looping or iteration over the next bucket to compute the average, but it looks like you are just dividing a single value by the bucket length. Kind of surprising that this still produces a reasonable value, but I guess maybe it shows how the algorithm isn't so sensitive to that 3rd point in the triangle.
https://github.com/viesti/clj-lttb/blob/8ae80e8d215dae3a94df3da25e2007aa636d897e/src/lttb/core.cljc#L26