Fixed-capacity owning candidate set used by the production probe hot path. 更多...
#include <Climbing.h>
Public 成员函数 | |
| void | clear () noexcept |
| Remove all candidates while retaining each slot's owned string capacity. | |
| void | consider (ClimbingCandidate candidate) |
| Consider one candidate and retain it only when it belongs to the best fixed-capacity set. | |
| void | considerWithActionId (ClimbingCandidate candidate, std::string_view actionId) |
| Consider a candidate while reusing slot-owned action-id storage on the production probe path. | |
| void | sortAndLimit (std::size_t limit) |
| Sort by canonical deterministic selection key and clamp to a validated limit. | |
| void | swap (ClimbingCandidateSet &other) noexcept |
| Exchange complete owning slot storage without allocating. | |
| bool | empty () const noexcept |
| Empty. | |
| std::size_t | size () const noexcept |
| Returns the size of . | |
| const ClimbingCandidate & | front () const noexcept |
| Front. | |
| ClimbingCandidate | takeFront () noexcept |
| Move the best candidate out of a non-empty set. | |
| const ClimbingCandidate & | operator[] (std::size_t index) const noexcept |
| const ClimbingCandidate * | begin () const noexcept |
| Returns the first candidate for synchronous read-only iteration. | |
| const ClimbingCandidate * | end () const noexcept |
| Returns the sentinel following the last candidate for synchronous read-only iteration. | |
| std::span< const ClimbingCandidate > | values () const noexcept |
静态 Public 属性 | |
| static constexpr std::size_t | Capacity = 8 |
详细描述
Fixed-capacity owning candidate set used by the production probe hot path.
consider retains the deterministic best eight candidates without heap growth in the container. String storage is reused when the same set is passed repeatedly to probeInto.
在文件 Climbing.h 第 329 行定义.
成员函数说明
◆ begin()
|
inlinenoexcept |
Returns the first candidate for synchronous read-only iteration.
- 返回
- A borrowed pointer valid only until this candidate set is modified or destroyed; do not retain it. @lifetime The candidate set owns the storage; the caller must not retain the returned pointer.
在文件 Climbing.h 第 360 行定义.
◆ clear()
|
inlinenoexcept |
Remove all candidates while retaining each slot's owned string capacity.
在文件 Climbing.h 第 334 行定义.
◆ consider()
| void eve::climbing::ClimbingCandidateSet::consider | ( | ClimbingCandidate | candidate | ) |
Consider one candidate and retain it only when it belongs to the best fixed-capacity set.
在文件 Climbing.cpp 第 23 行定义.
引用了 eve::climbing::ClimbingCandidate::actionId , 以及 considerWithActionId().
◆ considerWithActionId()
| void eve::climbing::ClimbingCandidateSet::considerWithActionId | ( | ClimbingCandidate | candidate, |
| std::string_view | actionId | ||
| ) |
Consider a candidate while reusing slot-owned action-id storage on the production probe path.
- 参数
-
actionId Stable definition id borrowed only for this synchronous call.
在文件 Climbing.cpp 第 29 行定义.
引用了 Capacity, eve::climbing::runtime_detail::isCandidateLess(), eve::climbing::ClimbingCandidate::obstacleBodyId, eve::climbing::ClimbingCandidate::obstacleShapeId, reused , 以及 eve::climbing::ClimbingCandidate::score.
被这些函数引用 consider() , 以及 eve::climbing::ClimbingRuntime::probeInto().
◆ empty()
|
inlinenoexcept |
◆ end()
|
inlinenoexcept |
Returns the sentinel following the last candidate for synchronous read-only iteration.
- 返回
- A borrowed pointer valid only until this candidate set is modified or destroyed; do not retain it. @lifetime The candidate set owns the storage; the caller must not retain the returned pointer.
在文件 Climbing.h 第 366 行定义.
◆ front()
|
inlinenoexcept |
◆ operator[]()
|
inlinenoexcept |
在文件 Climbing.h 第 354 行定义.
引用了 index.
◆ size()
|
inlinenoexcept |
Returns the size of .
在文件 Climbing.h 第 349 行定义.
◆ sortAndLimit()
| void eve::climbing::ClimbingCandidateSet::sortAndLimit | ( | std::size_t | limit | ) |
Sort by canonical deterministic selection key and clamp to a validated limit.
在文件 Climbing.cpp 第 55 行定义.
引用了 Capacity, eve::climbing::runtime_detail::isCandidateLess() , 以及 limit.
被这些函数引用 eve::climbing::ClimbingRuntime::probeInto() , 以及 eve::climbing::ClimbingCandidateBuffer::replace().
◆ swap()
|
noexcept |
Exchange complete owning slot storage without allocating.
在文件 Climbing.cpp 第 60 行定义.
被这些函数引用 eve::climbing::ClimbingRuntime::probeInto() , 以及 eve::climbing::ClimbingCandidateBuffer::replace().
◆ takeFront()
|
inlinenoexcept |
Move the best candidate out of a non-empty set.
在文件 Climbing.h 第 353 行定义.
◆ values()
|
inlinenoexcept |
在文件 Climbing.h 第 367 行定义.
类成员变量说明
◆ Capacity
|
staticconstexpr |
在文件 Climbing.h 第 331 行定义.
被这些函数引用 considerWithActionId() , 以及 sortAndLimit().
该类的文档由以下文件生成:
- src/modules/climbing/Climbing.h
- src/modules/climbing/Climbing.cpp