gtopt::AmplVariableKeyHash struct

Hasher for AmplVariableKey so the registry can use an unordered_map. The registry is built incrementally — one insert_or_assign per (element, attribute, scenario, stage) during every element's add_to_lp — which on a CEN-scale SDDP case is hundreds of thousands of insertions. A sorted flat_map made each of those an O(N) tail-shift of the large AmplVariable values (O(N²) overall, ~70 % of the solve on the profiled case); a hash map keeps insertion O(1) amortised with no element moves (the values are node-stable, which also keeps any find_ampl_cols span valid). All key components are individually hashable (Uid/Index are integral; the *Uid strong types carry strong::hashable).

Public functions

auto operator()(const AmplVariableKey& key) const -> std::size_t noexcept