载入中...
搜索中...
未找到
eve::climbing::ClimbingCandidateSet类 参考

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()

const ClimbingCandidate * eve::climbing::ClimbingCandidateSet::begin ( ) const
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 行定义.

被这些函数引用 eve::climbing::ClimbingRuntime::probeInto().

◆ clear()

void eve::climbing::ClimbingCandidateSet::clear ( )
inlinenoexcept

Remove all candidates while retaining each slot's owned string capacity.

在文件 Climbing.h 第 334 行定义.

被这些函数引用 eve::climbing::ClimbingRuntime::probeInto().

◆ 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().

被这些函数引用 eve::climbing::ClimbingCandidateBuffer::replace().

◆ 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.

参数
actionIdStable 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()

bool eve::climbing::ClimbingCandidateSet::empty ( ) const
inlinenoexcept

Empty.

在文件 Climbing.h 第 347 行定义.

被这些函数引用 eve::climbing::ClimbingRuntime::probeInto().

◆ end()

const ClimbingCandidate * eve::climbing::ClimbingCandidateSet::end ( ) const
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 行定义.

被这些函数引用 eve::climbing::ClimbingRuntime::probeInto().

◆ front()

const ClimbingCandidate & eve::climbing::ClimbingCandidateSet::front ( ) const
inlinenoexcept

Front.

在文件 Climbing.h 第 351 行定义.

被这些函数引用 eve::climbing::ClimbingRuntime::probeInto().

◆ operator[]()

const ClimbingCandidate & eve::climbing::ClimbingCandidateSet::operator[] ( std::size_t  index) const
inlinenoexcept

在文件 Climbing.h 第 354 行定义.

引用了 index.

◆ size()

std::size_t eve::climbing::ClimbingCandidateSet::size ( ) const
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()

void eve::climbing::ClimbingCandidateSet::swap ( ClimbingCandidateSet &  other)
noexcept

Exchange complete owning slot storage without allocating.

在文件 Climbing.cpp 第 60 行定义.

被这些函数引用 eve::climbing::ClimbingRuntime::probeInto() , 以及 eve::climbing::ClimbingCandidateBuffer::replace().

◆ takeFront()

ClimbingCandidate eve::climbing::ClimbingCandidateSet::takeFront ( )
inlinenoexcept

Move the best candidate out of a non-empty set.

在文件 Climbing.h 第 353 行定义.

◆ values()

std::span< const ClimbingCandidate > eve::climbing::ClimbingCandidateSet::values ( ) const
inlinenoexcept

在文件 Climbing.h 第 367 行定义.

类成员变量说明

◆ Capacity

constexpr std::size_t eve::climbing::ClimbingCandidateSet::Capacity = 8
staticconstexpr

在文件 Climbing.h 第 331 行定义.

被这些函数引用 considerWithActionId() , 以及 sortAndLimit().


该类的文档由以下文件生成: