|
tess 1.0.0
Performance-first tile and path simulation substrate
|
#include <tess/path/path.h>
Classes | |
| struct | OpenNode |
Public Member Functions | |
| void | reserve_nodes (std::size_t node_count) |
| void | clear () noexcept |
| auto | capacity_nodes () const noexcept -> std::size_t |
Friends | |
| template<typename World, typename Tag> | |
| auto | astar_path (const World &world, PathRequest request, PathScratch &scratch, MissingChunkPolicy policy=MissingChunkPolicy::ReportIndeterminate) -> PathResult |
| template<typename World, typename Tag, typename Provider> | |
| auto | astar_path (const World &world, PathRequest request, PathScratch &scratch, MissingChunkPolicy policy, const Provider &provider) -> PathResult |
| Finds a minimum-step path composed with a special-transition provider. | |
| template<typename World, typename Class> | |
| auto | weighted_astar_path (const World &world, PathRequest request, PathScratch &scratch, MissingChunkPolicy policy=MissingChunkPolicy::ReportIndeterminate) -> PathResult |
| template<typename World, typename Class, typename Provider> | |
| auto | weighted_astar_path (const World &world, PathRequest request, PathScratch &scratch, MissingChunkPolicy policy, const Provider &provider) -> PathResult |
| Finds a weighted path composed with a special-transition provider. | |
| template<typename World, typename Class, typename Provider> | |
| auto | weighted_astar_path (const World &world, PathRequest request, PathScratch &scratch, MissingChunkPolicy policy, const Provider &provider, PathTieBreak tie_break) -> PathResult |
| Finds a provider-aware weighted path with seeded equal-cost tie-breaking. | |
| template<typename World, typename Class> | |
| auto | weighted_astar_path (const World &world, PathRequest request, PathScratch &scratch, PathTieBreak tie_break, MissingChunkPolicy policy=MissingChunkPolicy::ReportIndeterminate) -> PathResult |
| Finds an optimal weighted path with seeded equal-cost tie-breaking. | |
| template<typename World, typename Tag> | |
| auto | cached_astar_path (const World &world, PathRequest request, PathScratch &scratch, UnitRouteCache &cache, MissingChunkPolicy policy=MissingChunkPolicy::ReportIndeterminate) -> PathResult |
| Finds a cached empty-provider route or computes and stores one. | |
| template<typename World, typename Tag, typename Provider> | |
| auto | cached_astar_path (const World &world, PathRequest request, PathScratch &scratch, UnitRouteCache &cache, const Provider &provider, MissingChunkPolicy policy=MissingChunkPolicy::ReportIndeterminate) -> PathResult |
| Runs unit A* with exact and same-goal suffix reuse from caller-owned cache. | |
Owns reusable A* frontier, node state, and returned path storage.
Instances are caller-owned and require external synchronization. Reserving for the search space avoids allocation once warm.
|
friend |
Finds a minimum-step path using a truthy passability field.
The returned path borrows scratch until its next mutation. Invalid endpoints and exhausted searches are distinguished in PathStatus.
|
friend |
Finds a cached empty-provider route or computes and stores one.
Contract: cached_astar_path never refreshes cache against the world by itself (the refresh scans world versions: O(chunk_count) on dense worlds, O(resident_count) on sparse ones – paid once per edit batch rather than per lookup). Direct adopters must therefore run cache.refresh_if_world_changed(world) at two points:
PathRequestRuntime performs the refresh once per batch in prepare_process under the DEFAULT cache policy; a runtime caller that sets PathRuntimeCachePolicy::invalidate_unit_route_cache_on_world_change to false opts out of that and carries this obligation directly. The definition in route_cache.h carries the full staleness contract, including the exact-mode alternatives.
|
friend |
Finds a minimum-cost path for a compile-time movement class.
The returned path borrows scratch until its next mutation.