Per-cell scratch record of one search. 更多...
#include <HexSearch.h>
Public 成员函数 | |
| std::int32_t | priority () const noexcept |
Ordering key of the priority queue (distance + heuristic). | |
Public 属性 | |
| std::int32_t | distance = 0 |
| Shortest distance from the search origin found so far. | |
| std::int32_t | pathFrom = -1 |
| Cell the path entered this cell from, or -1. | |
| std::int32_t | heuristic = 0 |
| Remaining-distance estimate towards the search goal (0 for blind searches). | |
| std::int32_t | searchPhase = 0 |
| Phase this record was written in; a record from an older phase is unvisited. | |
| std::int32_t | nextWithSamePriority = -1 |
| Next cell index sharing this record's priority bucket, or -1. | |
详细描述
Per-cell scratch record of one search.
The fields mirror the reference hex-map project's cell search data: a search is described by a monotonically increasing phase instead of a visited clearing pass, so a search never pays for resetting the whole grid.
在文件 HexSearch.h 第 23 行定义.
成员函数说明
◆ priority()
|
inlinenoexcept |
Ordering key of the priority queue (distance + heuristic).
在文件 HexSearch.h 第 36 行定义.
被这些函数引用 eve::hexmap::collectVisibleCells() , 以及 eve::hexmap::findPath().
类成员变量说明
◆ distance
| std::int32_t eve::hexmap::HexSearchData::distance = 0 |
Shortest distance from the search origin found so far.
在文件 HexSearch.h 第 25 行定义.
被这些函数引用 eve::hexmap::collectVisibleCells(), eve::hexmap::findPath() , 以及 priority().
◆ heuristic
| std::int32_t eve::hexmap::HexSearchData::heuristic = 0 |
Remaining-distance estimate towards the search goal (0 for blind searches).
在文件 HexSearch.h 第 29 行定义.
被这些函数引用 eve::hexmap::collectVisibleCells(), eve::hexmap::findPath() , 以及 priority().
◆ nextWithSamePriority
| std::int32_t eve::hexmap::HexSearchData::nextWithSamePriority = -1 |
Next cell index sharing this record's priority bucket, or -1.
在文件 HexSearch.h 第 33 行定义.
◆ pathFrom
| std::int32_t eve::hexmap::HexSearchData::pathFrom = -1 |
Cell the path entered this cell from, or -1.
在文件 HexSearch.h 第 27 行定义.
被这些函数引用 eve::hexmap::collectVisibleCells() , 以及 eve::hexmap::findPath().
◆ searchPhase
| std::int32_t eve::hexmap::HexSearchData::searchPhase = 0 |
Phase this record was written in; a record from an older phase is unvisited.
在文件 HexSearch.h 第 31 行定义.
被这些函数引用 eve::hexmap::collectVisibleCells() , 以及 eve::hexmap::findPath().
该结构体的文档由以下文件生成:
- src/modules/hexmap/HexSearch.h