Module heatmap
Expand description
Pure geometry for the objective heatmap: the sampled value grid, its color map, and the mapping from parameter space to the unit square. No window or GPU is involved, so every function is unit tested on the host.
Structs§
- Raster
- A
size × sizegrid of RGB pixels, row-major from the top (highy) row.
Constants§
- GRID
- The heatmap’s resolution per axis.
Functions§
- color
- A perceptually ordered dark-to-light color ramp (viridis stops),
tin[0, 1]and clamped outside it. Low values are dark. - raster
- Samples a two-parameter problem at pixel centres and colors the values.
- unit_
point - Maps a parameter point into the unit square:
(0, 0)is the bottom-left corner of the box,(1, 1)the top-right. ReturnsNonefor a point with the wrong dimension.