DescriptionRewrite Skyline code
* Do not use contiguous buildings. Instead, Y=-infinity is represented
by simply omitting the building. This reduces memory requirements
(for example, an empty skyline needs no buildings at all.), and
obviates the Skyline::normalize() call which takes ~1 % of CPU.
* Buildings store Y coordinate of the left edge, rather than the
intercept at x==0.0. This avoid excessive rounding problems when X
is large, and lets us compute building.height_at(x[LEFT]) cheaply.
* Avoid using infinity and NaN. We only let the X coordinates at the
edges be infinite (which is only necessary if a minimum height is
specified)
* Simplify the merge code, using less nested if statements.
* Add a unittest for the Skyline code
* Debug output is produced with Lookup::segments_to_line_stencil()
* Consolidate print and print_points
Patch Set 1 #
Total comments: 4
Patch Set 2 : don't trim zero width buildings #
Total comments: 9
Patch Set 3 : get rid of interval #
Total comments: 7
MessagesTotal messages: 17
|