HDK
|
#include <BV_KDOPTree.h>
Classes | |
class | base_iterator |
class | IndexedCompare |
Comparator class for stableSortIndices. More... | |
Public Types | |
typedef T | value_type |
typedef int(* | Comparator )(const T *, const T *) |
typedef base_iterator< T, true > | iterator |
typedef base_iterator< const T, true > | const_iterator |
typedef base_iterator< T, false > | reverse_iterator |
typedef base_iterator< const T, false > | const_reverse_iterator |
typedef const_iterator | traverser |
Public Member Functions | |
UT_Array (const UT_Array< T > &a) | |
UT_Array (UT_Array< T > &&a) noexcept | |
Move constructor. Steals the working data from the original. More... | |
UT_Array (exint capacity, exint size) | |
Construct based on given capacity and size. More... | |
UT_Array (exint capacity=0) | |
Construct based on given capacity with a size of 0. More... | |
UT_Array (std::initializer_list< T > init) | |
Construct with the contents of an initializer list. More... | |
~UT_Array () | |
void | swap (UT_Array< T > &other) |
exint | append () |
exint | append (const T &t) |
exint | append (T &&t) |
exint | append (const T &t, bool check_dup) |
void | append (const T *pt, exint count) |
void | appendMultiple (const T &t, exint count) |
exint | insert (exint index) |
exint | insert (const T &t, exint i) |
exint | insert (T &&t, exint i) |
template<typename... S> | |
exint | emplace_back (S &&...s) |
exint | uniqueSortedInsert (const T &t, Comparator compare) |
template<typename ComparatorBool > | |
exint | uniqueSortedInsert (const T &t, ComparatorBool is_less) |
exint | uniqueSortedInsert (T &&t, Comparator compare) |
exint | uniqueSortedFind (const T &item, Comparator compare) const |
template<typename ComparatorBool > | |
exint | uniqueSortedFind (const T &item, ComparatorBool is_less) const |
template<typename ComparatorBool > | |
void | merge (const UT_Array< T > &other, int direction, bool allow_dups, ComparatorBool is_less) |
bool | hasSortedSubset (const UT_Array< T > &other, Comparator compare) const |
void | sortedUnion (const UT_Array< T > &other, Comparator compare) |
void | sortedUnion (const UT_Array< T > &other, UT_Array< T > &result, Comparator compare) const |
void | sortedIntersection (const UT_Array< T > &other, Comparator compare) |
void | sortedIntersection (const UT_Array< T > &other, UT_Array< T > &result, Comparator compare) const |
void | sortedSetDifference (const UT_Array< T > &other, Comparator compare) |
void | sortedSetDifference (const UT_Array< T > &other, UT_Array< T > &result, Comparator compare) const |
exint | heapPush (const T &t, Comparator compare) |
T | heapPop (Comparator compare) |
const T & | heapMax () const |
exint | concat (const UT_Array< T > &a) |
Takes another T array and concatenate it onto my end. More... | |
exint | concat (UT_Array< T > &&a) noexcept |
Takes another T array and concatenate it onto my end. More... | |
exint | multipleInsert (exint index, exint count) |
Insert an element "count" times at the given index. Return the index. More... | |
exint | insertAt (const T &t, exint index) |
bool | isValidIndex (exint index) const |
Return true if given index is valid. More... | |
exint | findAndRemove (const T &t) |
exint | removeIndex (exint index) |
SYS_FORCE_INLINE void | removeLast () |
void | removeRange (exint begin_i, exint end_i) |
Remove the range [begin_i,end_i) of elements from the array. More... | |
void | extractRange (exint begin_i, exint end_i, UT_Array< T > &dest) |
template<typename IsEqual > | |
exint | removeIf (IsEqual is_equal) |
template<typename IsEqual > | |
void | collapseIf (IsEqual is_equal) |
Remove all matching elements. Also sets the capacity of the array. More... | |
void | move (exint src_idx, exint dst_idx, exint how_many) |
void | cycle (exint how_many) |
Cyclically shifts the entire array by how_many. More... | |
void | constant (const T &v) |
Quickly set the array to a single value. More... | |
void | zero () |
Zeros the array if a POD type, else trivial constructs if a class type. More... | |
exint | find (const T &t, exint s=0) const |
exint | sortedFind (const T &t, Comparator compare) const |
void | reverse () |
Reverses the array by swapping elements in mirrored locations. More... | |
void | sort (Comparator compare) |
template<typename ComparatorBool > | |
void | stdsort (ComparatorBool is_less) |
Sort using std::sort. The ComparatorBool uses the less-than semantics. More... | |
template<typename ComparatorBool > | |
void | stableSort (ComparatorBool is_less) |
template<typename ComparatorBool > | |
void | stableSortRange (ComparatorBool is_less, exint start, exint end) |
Like stableSort, but operates on a subset of the array. More... | |
template<typename I , typename ComparatorBool > | |
void | stableSortIndices (UT_Array< I > &indices, ComparatorBool is_less) const |
template<typename I , typename ComparatorBool > | |
void | stableArgSort (UT_Array< I > &indices, ComparatorBool is_less) const |
template<typename K , typename ComparatorBool > | |
void | stableSortByKey (const UT_Array< K > &keys, ComparatorBool is_less) |
exint | sortedRemoveDuplicates () |
template<typename CompareEqual > | |
exint | sortedRemoveDuplicatesIf (CompareEqual compare_equal) |
template<typename ComparatorBool > | |
void | sortAndRemoveDuplicates (ComparatorBool is_less) |
template<typename ComparatorBool > | |
T | selectNthLargest (exint idx, ComparatorBool is_less) |
void | setCapacity (exint newcapacity) |
void | setCapacityIfNeeded (exint mincapacity) |
void | bumpCapacity (exint mincapacity) |
void | bumpSize (exint newsize) |
void | bumpEntries (exint newsize) |
exint | capacity () const |
exint | size () const |
exint | entries () const |
Alias of size(). size() is preferred. More... | |
bool | isEmpty () const |
Returns true iff there are no occupied elements in the array. More... | |
int64 | getMemoryUsage (bool inclusive=false) const |
void | setSize (exint newsize) |
void | setSizeIfNeeded (exint minsize) |
void | entries (exint newsize) |
Alias of setSize(). setSize() is preferred. More... | |
void | setSizeNoInit (exint newsize) |
void | truncate (exint maxsize) |
Decreases, but never expands, to the given maxsize. More... | |
void | clear () |
Resets list to an empty list. More... | |
UT_Array< T > & | operator= (const UT_Array< T > &a) |
UT_Array< T > & | operator= (std::initializer_list< T > ilist) |
Replace the contents with those from the initializer_list ilist. More... | |
UT_Array< T > & | operator= (UT_Array< T > &&a) |
Move the contents of array a to this array. More... | |
bool | operator== (const UT_Array< T > &a) const |
bool | operator!= (const UT_Array< T > &a) const |
int | isEqual (const UT_Array< T > &a, Comparator compare) const |
T & | operator() (exint i) |
const T & | operator() (exint i) const |
T & | operator[] (exint i) |
const T & | operator[] (exint i) const |
T & | forcedRef (exint i) |
T | forcedGet (exint i) const |
T & | last () |
const T & | last () const |
exint | apply (int(*apply_func)(T &t, void *d), void *d) |
template<typename BinaryOp > | |
T | accumulate (const T &init_value, BinaryOp add) const |
T * | getArray () const |
const T * | getRawArray () const |
T * | array () |
const T * | array () const |
T * | data () |
const T * | data () const |
T * | aliasArray (T *newdata) |
iterator | begin () |
iterator | end () |
End iterator. More... | |
const_iterator | begin () const |
const_iterator | end () const |
End const iterator. Consider using it.atEnd() instead. More... | |
reverse_iterator | rbegin () |
Begin iterating over the array in reverse. More... | |
reverse_iterator | rend () |
End reverse iterator. More... | |
const_reverse_iterator | rbegin () const |
Begin iterating over the array in reverse. More... | |
const_reverse_iterator | rend () const |
End reverse iterator. Consider using it.atEnd() instead. More... | |
UT_IteratorRange< iterator > | range () |
UT_IteratorRange< const_iterator > | range () const |
UT_IteratorRange < reverse_iterator > | rrange () |
UT_IteratorRange < const_reverse_iterator > | rrange () const |
void | removeItem (const reverse_iterator &it) |
Remove item specified by the reverse_iterator. More... | |
void | unsafeShareData (UT_Array< T > &src) |
void | unsafeShareData (T *src, exint srcsize) |
void | unsafeShareData (T *src, exint size, exint capacity) |
void | unsafeClearData () |
bool | isHeapBuffer () const |
Returns true if the data used by the array was allocated on the heap. More... | |
bool | isHeapBuffer (T *data) const |
exint | sortedInsert (const T &t, Comparator compare) |
template<typename ComparatorBool > | |
exint | sortedInsert (const T &t, ComparatorBool is_less) |
exint | index (const T &t) const |
exint | safeIndex (const T &t) const |
Protected Member Functions | |
template<typename S > | |
exint | appendImpl (S &&s) |
template<typename S > | |
exint | insertImpl (S &&s, exint index) |
Similar to appendImpl() but for insertion. More... | |
template<typename S > | |
exint | uniqueSortedInsertImpl (S &&s, Comparator compare) |
template<typename First , typename... Rest> | |
void | validateEmplaceArgs (First &&first, Rest &&...rest) const |
void | validateEmplaceArgs () const |
Base case for validateEmplaceArgs(). More... | |
Static Protected Member Functions | |
static constexpr SYS_FORCE_INLINE bool | isPOD () |
template<typename... S> | |
static void | construct (T &dst, S &&...s) |
static void | copyConstruct (T &dst, const T &src) |
static void | copyConstructRange (T *dst, const T *src, exint n) |
static void | trivialConstruct (T &dst) |
Element Constructor. More... | |
static void | trivialConstructRange (T *dst, exint n) |
static SYS_FORCE_INLINE void | trivialDestruct (T &dst) |
Element Destructor. More... | |
static void | trivialDestructRange (T *dst, exint n) |
Friends | |
template<typename OS , typename S > | |
OS & | operator<< (OS &os, const UT_Array< S > &d) |
void | swap (UT_Array< T > &a, UT_Array< T > &b) |
Definition at line 18 of file BV_KDOPTree.h.
Definition at line 45 of file UT_Array.h.
typedef base_iterator<const T, true> UT_Array< T >::const_iterator |
Definition at line 810 of file UT_Array.h.
typedef base_iterator<const T, false> UT_Array< T >::const_reverse_iterator |
Definition at line 812 of file UT_Array.h.
typedef base_iterator<T, true> UT_Array< T >::iterator |
Definition at line 809 of file UT_Array.h.
typedef base_iterator<T, false> UT_Array< T >::reverse_iterator |
Definition at line 811 of file UT_Array.h.
typedef const_iterator UT_Array< T >::traverser |
Definition at line 813 of file UT_Array.h.
typedef T UT_Array< T >::value_type |
Definition at line 43 of file UT_Array.h.
Copy constructor. It duplicates the data. It's marked explicit so that it's not accidentally passed by value. You can always pass by reference and then copy it, if needed. If you have a line like: UT_Array<int> a = otherarray; and it really does need to copy instead of referencing, you can rewrite it as: UT_Array<int> a(otherarray);
Definition at line 38 of file UT_ArrayImpl.h.
Move constructor. Steals the working data from the original.
Definition at line 70 of file UT_ArrayImpl.h.
Construct based on given capacity and size.
Definition at line 61 of file UT_Array.h.
Construct based on given capacity with a size of 0.
Definition at line 72 of file UT_Array.h.
Construct with the contents of an initializer list.
Definition at line 54 of file UT_ArrayImpl.h.
Definition at line 91 of file UT_ArrayImpl.h.
|
inline |
Definition at line 1261 of file UT_ArrayImpl.h.
This method allows you to swap in a new raw T array, which must be the same size as myCapacity. Use caution with this method.
Definition at line 660 of file UT_Array.h.
Append an element to the current elements and return its index in the array, or insert the element at a specified position; if necessary, insert() grows the array to accommodate the element. The insert methods use the assignment operator '=' to place the element into the right spot; be aware that '=' works differently on objects and pointers. The test for duplicates uses the logical equal operator '=='; as with '=', the behaviour of the equality operator on pointers versus objects is not the same. Use the subscript operators instead of insert() if you are appending to the array, or if you don't mind overwriting the element already inserted at the given index.
Definition at line 95 of file UT_Array.h.
Definition at line 96 of file UT_Array.h.
Definition at line 97 of file UT_Array.h.
Definition at line 98 of file UT_Array.h.
Definition at line 194 of file UT_ArrayImpl.h.
|
inlineprotected |
Implements both append(const T &) and append(T &&) via perfect forwarding. Unlike the variadic emplace_back(), its argument may be a reference to another element in the array.
Definition at line 156 of file UT_ArrayImpl.h.
Definition at line 203 of file UT_ArrayImpl.h.
|
inline |
Apply a user-defined function to each element of the array as int as the function returns zero. If apply_func returns 1, apply() stops traversing the list and returns the current index; otherwise, apply() returns the size.
Definition at line 984 of file UT_ArrayImpl.h.
Definition at line 653 of file UT_Array.h.
Begin iterating over the array. The contents of the array may be modified during the traversal.
Definition at line 817 of file UT_Array.h.
|
inline |
Begin iterating over the array. The array may not be modified during the traversal.
Definition at line 830 of file UT_Array.h.
If the capacity is smaller than mincapacity, expand the array to at least mincapacity and to at least a constant factor of the array's previous capacity, to avoid having a linear number of reallocations in a linear number of calls to bumpCapacity.
Definition at line 445 of file UT_Array.h.
NOTE: bumpEntries() will be deprecated in favour of bumpSize() in a future version.
Definition at line 469 of file UT_Array.h.
First bumpCapacity to ensure that there's space for newsize, expanding either not at all or by at least a constant factor of the array's previous capacity, then set the size to newsize.
Definition at line 462 of file UT_Array.h.
Query the capacity, i.e. the allocated length of the array. NOTE: capacity() >= size().
Definition at line 476 of file UT_Array.h.
Resets list to an empty list.
Definition at line 549 of file UT_Array.h.
|
inline |
Remove all matching elements. Also sets the capacity of the array.
Definition at line 255 of file UT_Array.h.
Takes another T array and concatenate it onto my end.
Definition at line 423 of file UT_ArrayImpl.h.
Takes another T array and concatenate it onto my end.
Definition at line 434 of file UT_ArrayImpl.h.
Quickly set the array to a single value.
Definition at line 704 of file UT_ArrayImpl.h.
|
inlinestaticprotected |
Definition at line 965 of file UT_Array.h.
|
inlinestaticprotected |
Definition at line 971 of file UT_Array.h.
|
inlinestaticprotected |
Definition at line 978 of file UT_Array.h.
Cyclically shifts the entire array by how_many.
Definition at line 678 of file UT_ArrayImpl.h.
Definition at line 656 of file UT_Array.h.
Adds a new element to the array (resizing if necessary) and forwards the given arguments to T's constructor. NOTE: Unlike append(), the arguments cannot reference any existing elements in the array. Checking for and handling such cases would remove most of the performance gain versus append(T(...)). Debug builds will assert that the arguments are valid.
Definition at line 179 of file UT_ArrayImpl.h.
End iterator.
Definition at line 822 of file UT_Array.h.
|
inline |
End const iterator. Consider using it.atEnd() instead.
Definition at line 835 of file UT_Array.h.
Alias of size(). size() is preferred.
Definition at line 481 of file UT_Array.h.
Alias of setSize(). setSize() is preferred.
Definition at line 519 of file UT_Array.h.
|
inline |
Remove the range [begin_i, end_i) of elements from this array and place them in the dest array, shrinking/growing the dest array as necessary.
Definition at line 562 of file UT_ArrayImpl.h.
Search for t linearly using the '==' operator, starting at index s.
Definition at line 729 of file UT_ArrayImpl.h.
Remove one element from the array given the element itself or its position in the list, and fill the gap by shifting the elements down by one position. Return the index of the element remove or -1 if the value was not found.
Definition at line 525 of file UT_ArrayImpl.h.
forcedGet(exint) does NOT grow the array, and will return default objects for out of bound array indices.
Definition at line 624 of file UT_Array.h.
forcedRef(exint) will grow the array if necessary, initializing any new elements to zero for POD types and default constructing for class types.
Definition at line 614 of file UT_Array.h.
Definition at line 649 of file UT_Array.h.
Returns the amount of memory used by this UT_Array. If inclusive is false, it only counts the memory of the array. This is often necessary to avoid double-counting, e.g. if this UT_Array is a member variable of a class whose memory is already being counted by the caller.
Definition at line 490 of file UT_Array.h.
Definition at line 650 of file UT_Array.h.
|
inline |
Definition at line 1078 of file UT_ArrayImpl.h.
Assuming the array is already a heap, return the top (maximum) element.
Definition at line 198 of file UT_Array.h.
|
inline |
Assuming the array is already a heap, extracts the top (maximum) element from the heap and returns it.
Definition at line 386 of file UT_ArrayImpl.h.
Assuming the array is already a heap, it inserts item t maintaining the heap. It returns the index of the inserted item.
Definition at line 369 of file UT_ArrayImpl.h.
The fastest search possible, which does pointer arithmetic to find the index of the element. WARNING: index() does no out-of-bounds checking.
Definition at line 291 of file UT_Array.h.
Definition at line 130 of file UT_ArrayImpl.h.
Definition at line 108 of file UT_Array.h.
Definition at line 110 of file UT_Array.h.
An alias for unique element insertion at a certain index. Also used by the other insertion methods.
Definition at line 214 of file UT_Array.h.
|
inlineprotected |
Similar to appendImpl() but for insertion.
Definition at line 477 of file UT_ArrayImpl.h.
Returns true iff there are no occupied elements in the array.
Definition at line 483 of file UT_Array.h.
|
inline |
Definition at line 970 of file UT_ArrayImpl.h.
Returns true if the data used by the array was allocated on the heap.
Definition at line 910 of file UT_Array.h.
Definition at line 914 of file UT_Array.h.
|
inlinestaticprotected |
Definition at line 924 of file UT_Array.h.
Return true if given index is valid.
Definition at line 218 of file UT_Array.h.
Definition at line 629 of file UT_Array.h.
Definition at line 634 of file UT_Array.h.
|
inline |
Merge the given array into us. If direction is -1, then it assumes us and 'other' are both already sorted in descending order. Similarly, +1 means ascending. If allow_dups is false, then it further assumes that both arrays have no duplicates and will produce a result that also has no duplicates. More work will be needed if you want allow_dups to mean remove duplicates
Definition at line 1004 of file UT_ArrayImpl.h.
|
inline |
Move how_many objects starting at index src_idx to dst_idx; This method will remove the elements at [src_idx, src_idx+how_many) and then insert them at dst_idx. This method can be used in place of the old shift() operation.
Definition at line 594 of file UT_ArrayImpl.h.
Insert an element "count" times at the given index. Return the index.
Definition at line 450 of file UT_ArrayImpl.h.
Definition at line 963 of file UT_ArrayImpl.h.
Subscript operator NOTE: This does NOT do any bounds checking unless paranoid asserts are enabled.
Definition at line 580 of file UT_Array.h.
Const subscript operator NOTE: This does NOT do any bounds checking unless paranoid asserts are enabled.
Definition at line 588 of file UT_Array.h.
Assign array a to this array by copying each of a's elements with memcpy for POD types, and with copy construction for class types.
Definition at line 866 of file UT_ArrayImpl.h.
|
inline |
Replace the contents with those from the initializer_list ilist.
Definition at line 886 of file UT_ArrayImpl.h.
Move the contents of array a to this array.
Definition at line 906 of file UT_ArrayImpl.h.
Compare two array and return true if they are equal and false otherwise. Two elements are checked against each other using operator '==' or compare() respectively. NOTE: The capacities of the arrays are not checked when determining whether they are equal.
Definition at line 952 of file UT_ArrayImpl.h.
Subscript operator NOTE: This does NOT do any bounds checking unless paranoid asserts are enabled.
Definition at line 597 of file UT_Array.h.
Const subscript operator NOTE: This does NOT do any bounds checking unless paranoid asserts are enabled.
Definition at line 605 of file UT_Array.h.
|
inline |
Definition at line 864 of file UT_Array.h.
|
inline |
Definition at line 866 of file UT_Array.h.
|
inline |
Begin iterating over the array in reverse.
Definition at line 842 of file UT_Array.h.
|
inline |
Begin iterating over the array in reverse.
Definition at line 853 of file UT_Array.h.
|
inline |
Removes all matching elements from the list, shuffling down and changing the size appropriately. Returns the number of elements left.
Definition at line 646 of file UT_ArrayImpl.h.
Definition at line 226 of file UT_Array.h.
|
inline |
Remove item specified by the reverse_iterator.
Definition at line 875 of file UT_Array.h.
|
inline |
Definition at line 230 of file UT_Array.h.
Remove the range [begin_i,end_i) of elements from the array.
Definition at line 547 of file UT_ArrayImpl.h.
|
inline |
End reverse iterator.
Definition at line 848 of file UT_Array.h.
|
inline |
End reverse iterator. Consider using it.atEnd() instead.
Definition at line 859 of file UT_Array.h.
Reverses the array by swapping elements in mirrored locations.
Definition at line 754 of file UT_ArrayImpl.h.
|
inline |
Definition at line 869 of file UT_Array.h.
|
inline |
Definition at line 871 of file UT_Array.h.
The fastest search possible, which does pointer arithmetic to find the index of the element. WARNING: index() does no out-of-bounds checking.
Definition at line 292 of file UT_Array.h.
|
inline |
Partitions the array into values greater than or less than the Nth element, returns the resulting partition number. idx == 0 will get the minimum value, idx == size()-1 the maximum value. This does modify this array!
Definition at line 771 of file UT_ArrayImpl.h.
Set the capacity of the array, i.e. grow it or shrink it. The function copies the data after reallocating space for the array.
Definition at line 790 of file UT_ArrayImpl.h.
Definition at line 436 of file UT_Array.h.
Set the size, the number of occupied elements in the array. NOTE: This will not do bumpCapacity, so if you call this n times to increase the size, it may take n^2 time.
Definition at line 499 of file UT_Array.h.
Definition at line 512 of file UT_Array.h.
Set the size, but unlike setSize(newsize), this function will not initialize new POD elements to zero. Non-POD data types will still have their constructors called. This function is faster than setSize(ne) if you intend to fill in data for all elements.
Definition at line 528 of file UT_Array.h.
Query the size, i.e. the number of occupied elements in the array. NOTE: capacity() >= size().
Definition at line 479 of file UT_Array.h.
|
inline |
Sort the array using a comparison function that you must provide. t1 and t2 are pointers to Thing. The comparison function uses strcmp() semantics (i.e. -1 if less than, 0 if equal, 1 if greater).
Definition at line 763 of file UT_ArrayImpl.h.
|
inline |
Sort remove duplicates. Requires that equal elements are adjacent after sorting.
Definition at line 420 of file UT_Array.h.
Search for t via binary search using the function specified in the parameter list, assuming the array is already sorted with respect to compare.
Definition at line 740 of file UT_ArrayImpl.h.
Assuming the array is sorted, it inserts item t maintaining the sorted state of the array. It returns the index of the inserted item.
Definition at line 227 of file UT_ArrayImpl.h.
|
inline |
Assuming the array is sorted, it inserts item t maintaining the sorted state of the array. It returns the index of the inserted item.
Definition at line 253 of file UT_ArrayImpl.h.
|
inline |
Definition at line 1144 of file UT_ArrayImpl.h.
|
inline |
Definition at line 1153 of file UT_ArrayImpl.h.
Assuming this array is sorted, remove all duplicate elements. Returns the number of elements removed.
Definition at line 1252 of file UT_ArrayImpl.h.
|
inline |
Assuming this array is sorted, remove all duplicate elements using the given binary predicate. Returns the number of elements removed
Definition at line 1218 of file UT_ArrayImpl.h.
|
inline |
Definition at line 1175 of file UT_ArrayImpl.h.
|
inline |
Definition at line 1184 of file UT_ArrayImpl.h.
|
inline |
Definition at line 1090 of file UT_ArrayImpl.h.
|
inline |
Definition at line 1099 of file UT_ArrayImpl.h.
|
inline |
Create an index array from 0..n-1 into this array and sort it with stableSortIndices. The index array will be resized & rebuilt by this.
Definition at line 384 of file UT_Array.h.
|
inline |
stableSort is both stable, so keeps equal elements in the same order (note this is very useful for compatibility between compilers) and templated. Either use a bool sort function or make a utility class with bool operator()(const T a, const T b) the utility class lets you bind data to avoid globals. The comparator returns true if a must occur before b in the list. For sorting ascending, this is a less than operation.
Definition at line 320 of file UT_Array.h.
|
inline |
Sorts this array by an external key array. We assume a 1:1 corespondence between our own elements and those of the key array. The comparator should be defined on the key type.
Definition at line 397 of file UT_Array.h.
|
inline |
Sort indices array by the values indexed into this array using a stable sorting algorithm. To reorder the array in such a way that it would be sorted, or another array to be reordered the same way, include UT_Permute.h and use: UTinversePermute(values.getArray(), indices.getArray(), values.size()); The ComparatorBool uses the less-than semantics. I must be an integer type.
Definition at line 372 of file UT_Array.h.
|
inline |
Like stableSort, but operates on a subset of the array.
Definition at line 331 of file UT_Array.h.
|
inline |
Sort using std::sort. The ComparatorBool uses the less-than semantics.
Definition at line 306 of file UT_Array.h.
Definition at line 120 of file UT_ArrayImpl.h.
Element Constructor.
Definition at line 996 of file UT_Array.h.
|
inlinestaticprotected |
Definition at line 1003 of file UT_Array.h.
|
inlinestaticprotected |
Element Destructor.
Definition at line 1026 of file UT_Array.h.
|
inlinestaticprotected |
Definition at line 1031 of file UT_Array.h.
Decreases, but never expands, to the given maxsize.
Definition at line 543 of file UT_Array.h.
|
inline |
Convenience method to perform binary search of a ascending sorted array with no duplicates. Returns the index of the specified item, -1 if not found.
Definition at line 347 of file UT_ArrayImpl.h.
|
inline |
Definition at line 325 of file UT_ArrayImpl.h.
|
inline |
Definition at line 135 of file UT_Array.h.
|
inline |
Definition at line 302 of file UT_ArrayImpl.h.
|
inline |
Definition at line 143 of file UT_Array.h.
|
inlineprotected |
Definition at line 279 of file UT_ArrayImpl.h.
Definition at line 902 of file UT_Array.h.
Very dangerous methods to share arrays. The array is not aware of the sharing, so ensure you clear out the array prior a destructor or setCapacity operation.
Definition at line 884 of file UT_Array.h.
Definition at line 890 of file UT_Array.h.
|
inline |
Definition at line 896 of file UT_Array.h.
|
inlineprotected |
In debug builds, verifies that the arguments to emplace_back() will not be invalidated when realloc() is called.
Definition at line 946 of file UT_Array.h.
Base case for validateEmplaceArgs().
Definition at line 959 of file UT_Array.h.
Zeros the array if a POD type, else trivial constructs if a class type.
Definition at line 719 of file UT_ArrayImpl.h.
|
friend |
Definition at line 1108 of file UT_Array.h.
Friend specialization of std::swap() to use UT_String::swap()
Definition at line 1062 of file UT_Array.h.