16#ifndef BT_OBJECT_ARRAY__
17#define BT_OBJECT_ARRAY__
28#define BT_USE_PLACEMENT_NEW 1
30#define BT_ALLOW_ARRAY_COPY_OPERATOR
37#ifdef BT_USE_PLACEMENT_NEW
55#ifdef BT_ALLOW_ARRAY_COPY_OPERATOR
75 for (i =
start; i < end; ++i)
94 for (i = first; i < last; i++)
220#ifdef BT_USE_PLACEMENT_NEW
250#ifdef BT_USE_PLACEMENT_NEW
265#ifdef BT_USE_PLACEMENT_NEW
310 template <
typename L>
340 template <
typename L>
351 template <
typename L>
385 char temp[
sizeof(
T)];
396 template <
typename L>
402 for (
k = n / 2;
k > 0;
k--)
422 int last =
size() - 1;
425 while (first <= last)
427 int mid = (first + last) / 2;
443 for (i = 0; i <
size(); i++)
461 for (i = 0; i <
size(); i++)
#define BT_USE_PLACEMENT_NEW
If the platform doesn't support placement new, you can disable BT_USE_PLACEMENT_NEW then the btAligne...
const T & btMax(const T &a, const T &b)
#define SIMD_FORCE_INLINE
The btAlignedAllocator is a portable class for aligned memory allocations.
pointer allocate(size_type n, const_pointer *hint=0)
void deallocate(pointer ptr)
bool operator()(const T &a, const T &b) const
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
int findLinearSearch2(const T &key) const
void resizeNoInitialize(int newsize)
resize changes the number of elements in the array.
int size() const
return the number of elements in the array
void copyFromArray(const btAlignedObjectArray &otherArray)
int findLinearSearch(const T &key) const
void resize(int newsize, const T &fillData=T())
void swap(int index0, int index1)
void clear()
clear the array, deallocated memory. Generally it is better to use array.resize(0),...
btAlignedObjectArray< T > & operator=(const btAlignedObjectArray< T > &other)
void * allocate(int size)
void removeAtIndex(int index)
void remove(const T &key)
T & expandNonInitializing()
T & expand(const T &fillValue=T())
void destroy(int first, int last)
const T & operator[](int n) const
void quickSort(const L &CompareFunc)
btAlignedAllocator< T, 16 > m_allocator
void copy(int start, int end, T *dest) const
void heapSort(const L &CompareFunc)
void push_back(const T &_Val)
void initializeFromBuffer(void *buffer, int size, int capacity)
int capacity() const
return the pre-allocated (reserved) elements, this is at least as large as the total number of elemen...
int findBinarySearch(const T &key) const
non-recursive binary search, assumes sorted array
const T & at(int n) const
btAlignedObjectArray(const btAlignedObjectArray &otherArray)
Generally it is best to avoid using the copy constructor of an btAlignedObjectArray,...
void downHeap(T *pArr, int k, int n, const L &CompareFunc)
heap sort from http://www.csse.monash.edu.au/~lloyd/tildeAlgDS/Sort/Heap/
void quickSortInternal(const L &CompareFunc, int lo, int hi)