Ark Server API (ASE) - Wiki
|
Functions | |
template<typename T > | |
FORCEINLINE void | Reverse (T *Array, int32 ArraySize) |
template<typename RangeValueType , typename PredicateValueType , typename ProjectionType , typename SortPredicateType > | |
FORCEINLINE SIZE_T | LowerBoundInternal (RangeValueType *First, const SIZE_T Num, const PredicateValueType &Value, ProjectionType Projection, SortPredicateType SortPredicate) |
template<typename RangeValueType , typename PredicateValueType , typename ProjectionType , typename SortPredicateType > | |
FORCEINLINE SIZE_T | UpperBoundInternal (RangeValueType *First, const SIZE_T Num, const PredicateValueType &Value, ProjectionType Projection, SortPredicateType SortPredicate) |
template<typename T , typename ProjectionType , typename PredicateType > | |
void | IntroSortInternal (T *First, SIZE_T Num, ProjectionType Projection, PredicateType Predicate) |
FORCEINLINE int32 | HeapGetLeftChildIndex (int32 Index) |
FORCEINLINE bool | HeapIsLeaf (int32 Index, int32 Count) |
FORCEINLINE int32 | HeapGetParentIndex (int32 Index) |
template<typename RangeValueType , typename ProjectionType , typename PredicateType > | |
FORCEINLINE void | HeapSiftDown (RangeValueType *Heap, int32 Index, const int32 Count, const ProjectionType &Projection, const PredicateType &Predicate) |
template<class RangeValueType , typename ProjectionType , class PredicateType > | |
FORCEINLINE int32 | HeapSiftUp (RangeValueType *Heap, int32 RootIndex, int32 NodeIndex, const ProjectionType &Projection, const PredicateType &Predicate) |
template<typename RangeValueType , typename ProjectionType , typename PredicateType > | |
FORCEINLINE void | HeapifyInternal (RangeValueType *First, SIZE_T Num, ProjectionType Projection, PredicateType Predicate) |
template<typename RangeValueType , typename ProjectionType , class PredicateType > | |
void | HeapSortInternal (RangeValueType *First, SIZE_T Num, ProjectionType Projection, PredicateType Predicate) |
Gets the index of the left child of node at Index.
Index | Node for which the left child index is to be returned. |
Definition at line 16 of file BinaryHeap.h.
Gets the parent index for node at Index.
Index | node index. |
Definition at line 38 of file BinaryHeap.h.
FORCEINLINE void AlgoImpl::HeapifyInternal | ( | RangeValueType * | First, |
SIZE_T | Num, | ||
ProjectionType | Projection, | ||
PredicateType | Predicate ) |
Builds an implicit min-heap from a range of elements. This is the internal function used by Heapify overrides.
First | pointer to the first element to heapify |
Num | the number of items to heapify |
Projection | The projection to apply to the elements. |
Predicate | A binary predicate object used to specify if one element should precede another. |
Definition at line 115 of file BinaryHeap.h.
Checks if node located at Index is a leaf or not.
Index | Node index. |
Definition at line 27 of file BinaryHeap.h.
FORCEINLINE void AlgoImpl::HeapSiftDown | ( | RangeValueType * | Heap, |
int32 | Index, | ||
const int32 | Count, | ||
const ProjectionType & | Projection, | ||
const PredicateType & | Predicate ) |
Fixes a possible violation of order property between node at Index and a child.
Heap | Pointer to the first element of a binary heap. |
Index | Node index. |
Count | Size of the heap. |
Projection | The projection to apply to the elements. |
Predicate | A binary predicate object used to specify if one element should precede another. |
Definition at line 53 of file BinaryHeap.h.
FORCEINLINE int32 AlgoImpl::HeapSiftUp | ( | RangeValueType * | Heap, |
int32 | RootIndex, | ||
int32 | NodeIndex, | ||
const ProjectionType & | Projection, | ||
const PredicateType & | Predicate ) |
Fixes a possible violation of order property between node at NodeIndex and a parent.
Heap | Pointer to the first element of a binary heap. |
RootIndex | How far to go up? |
NodeIndex | Node index. |
Projection | The projection to apply to the elements. |
Predicate | A binary predicate object used to specify if one element should precede another. |
Definition at line 88 of file BinaryHeap.h.
void AlgoImpl::HeapSortInternal | ( | RangeValueType * | First, |
SIZE_T | Num, | ||
ProjectionType | Projection, | ||
PredicateType | Predicate ) |
Performs heap sort on the elements. This is the internal sorting function used by HeapSort overrides.
First | pointer to the first element to sort |
Num | the number of elements to sort |
Predicate | predicate class |
Definition at line 132 of file BinaryHeap.h.
void AlgoImpl::IntroSortInternal | ( | T * | First, |
SIZE_T | Num, | ||
ProjectionType | Projection, | ||
PredicateType | Predicate ) |
Implementation of an introspective sort. Starts with quick sort and switches to heap sort when the iteration depth is too big. The sort is unstable, meaning that the ordering of equal items is not necessarily preserved. This is the internal sorting function used by IntroSort overrides.
First | pointer to the first element to sort |
Num | the number of items to sort |
Projection | The projection to sort by when applied to the element. |
Predicate | predicate class |
Definition at line 26 of file IntroSort.h.
FORCEINLINE SIZE_T AlgoImpl::LowerBoundInternal | ( | RangeValueType * | First, |
const SIZE_T | Num, | ||
const PredicateValueType & | Value, | ||
ProjectionType | Projection, | ||
SortPredicateType | SortPredicate ) |
Performs binary search, resulting in position of the first element >= Value
First | Pointer to array |
Num | Number of elements in array |
Value | Value to look for |
Projection | Called on values in array to get type that can be compared to Value |
SortPredicate | Predicate for sort comparison |
Definition at line 23 of file BinarySearch.h.
FORCEINLINE void AlgoImpl::Reverse | ( | T * | Array, |
int32 | ArraySize ) |
FORCEINLINE SIZE_T AlgoImpl::UpperBoundInternal | ( | RangeValueType * | First, |
const SIZE_T | Num, | ||
const PredicateValueType & | Value, | ||
ProjectionType | Projection, | ||
SortPredicateType | SortPredicate ) |
Performs binary search, resulting in position of the first element that is larger than the given value
First | Pointer to array |
Num | Number of elements in array |
Value | Value to look for |
SortPredicate | Predicate for sort comparison |
Definition at line 56 of file BinarySearch.h.