tess 1.0.0
Performance-first tile and path simulation substrate
Loading...
Searching...
No Matches
tess::movement::OverlayCost< Base, Overlay > Struct Template Reference

#include <tess/topology/movement_class.h>

Static Public Member Functions

template<typename Page>
static constexpr std::uint32_t eval (const Page &page, LocalTileId id) noexcept

Detailed Description

template<typename Base, typename Overlay>
struct tess::movement::OverlayCost< Base, Overlay >

Prices a base cost with an additive overlay, preserving impassability.

eval() is zero if and only if Base::eval() is zero: an overlay prices a tile the base already admits, and can never make an impassable one enterable. The operands are therefore not interchangeable, which is why this is not spelled as a sum. It matches the rule the transition model already applies where a provider's cost meets a class's entry cost: pricing an edge does not override destination entry legality.

The overlay's zero means "no surcharge". That is the one place in this vocabulary where zero is not the impassable sentinel.

Absorption is a backstop, not a substitute for putting the base's impassability in the passability predicate. NotZero<BaseTag> there is what keeps the region graph exact, and the minimum-step APIs that substitute UnitCost for a class's cost expression see only the predicate.


The documentation for this struct was generated from the following file: