#include <route/heat_grid.hpp>
|
| void | init (const geom::Box &area, Coord min_cell) |
| | Covers area with square cells of at least min_cell nm (cell size rounded up to whole micrometres).
|
| bool | ready () const |
| void | clear () |
| void | add (geom::Point p, std::uint64_t w) |
| | accumulate (search effort)
|
| void | raise (geom::Point p, std::uint64_t v) |
| | keep the maximum (history cost): independent of visiting order
|
| std::uint64_t | max () const |
| int | width () const |
| int | height () const |
| Coord | cell () const |
| std::vector< std::uint8_t > | bytes () const |
| | One byte per cell, row-major: round(255 * sqrt(v / max)), at least 1 for any non-zero cell so faint activity stays visible.
|
| std::string | message (std::string_view name, int layer) const |
| | The heatmap protocol message (layer -1 = all layers) with "scale":"sqrt" so a legend can invert it.
|
|
| static constexpr int | kMaxCells = 128 |
| | At most this many cells along the longer side: a 128 x 128 overlay is ~16k values per message, small enough to resend every few hundred thousand expansions without slowing the router or bloating recordings.
|
Definition at line 16 of file heat_grid.hpp.
◆ add()
| void tmk::route::HeatGrid::add |
( |
geom::Point | p, |
|
|
std::uint64_t | w ) |
accumulate (search effort)
◆ bytes()
| std::vector< std::uint8_t > tmk::route::HeatGrid::bytes |
( |
| ) |
const |
One byte per cell, row-major: round(255 * sqrt(v / max)), at least 1 for any non-zero cell so faint activity stays visible.
The square root keeps heavy-tailed counts (a few hot spots) from washing out everything else.
◆ cell()
| Coord tmk::route::HeatGrid::cell |
( |
| ) |
const |
|
inline |
◆ clear()
| void tmk::route::HeatGrid::clear |
( |
| ) |
|
◆ height()
| int tmk::route::HeatGrid::height |
( |
| ) |
const |
|
inline |
◆ init()
| void tmk::route::HeatGrid::init |
( |
const geom::Box & | area, |
|
|
Coord | min_cell ) |
Covers area with square cells of at least min_cell nm (cell size rounded up to whole micrometres).
◆ max()
| std::uint64_t tmk::route::HeatGrid::max |
( |
| ) |
const |
◆ message()
| std::string tmk::route::HeatGrid::message |
( |
std::string_view | name, |
|
|
int | layer ) const |
The heatmap protocol message (layer -1 = all layers) with "scale":"sqrt" so a legend can invert it.
◆ raise()
| void tmk::route::HeatGrid::raise |
( |
geom::Point | p, |
|
|
std::uint64_t | v ) |
keep the maximum (history cost): independent of visiting order
◆ ready()
| bool tmk::route::HeatGrid::ready |
( |
| ) |
const |
|
inline |
◆ width()
| int tmk::route::HeatGrid::width |
( |
| ) |
const |
|
inline |
◆ kMaxCells
| int tmk::route::HeatGrid::kMaxCells = 128 |
|
staticconstexpr |
At most this many cells along the longer side: a 128 x 128 overlay is ~16k values per message, small enough to resend every few hundred thousand expansions without slowing the router or bloating recordings.
Definition at line 20 of file heat_grid.hpp.
The documentation for this class was generated from the following file: