PCL
|
Generic dynamic sorted array of pointers to objects. More...
#include <IndirectSortedArray.h>
Public Member Functions | |
IndirectSortedArray ()=default | |
IndirectSortedArray (const IndirectSortedArray &)=default | |
template<class FI > | |
IndirectSortedArray (FI i, FI j) | |
IndirectSortedArray (IndirectSortedArray &&)=default | |
IndirectSortedArray (size_type n) | |
IndirectSortedArray (size_type n, const T *p) | |
~IndirectSortedArray () | |
void | Add (const IndirectArray< T, A > &x) |
void | Add (const IndirectSortedArray &x) |
const_iterator | Add (const T *p, size_type n=1) |
template<class FI > | |
void | Add (FI i, FI j) |
const allocator & | Allocator () const |
template<class F > | |
void | Apply (F f) const |
void | Assign (const array_implementation &x) |
void | Assign (const IndirectSortedArray &x) |
void | Assign (const T *p, size_type n=1) |
template<class FI > | |
void | Assign (FI i, FI j) |
const_iterator | At (size_type i) const |
size_type | Available () const |
const_iterator | Begin () const |
const_iterator | begin () const |
size_type | Capacity () const |
void | Clear () |
template<class C > | |
void | CloneAssign (const C &x) |
void | CloneAssign (IndirectSortedArray &x) |
void | CloneAssign (SortedArray< T, A > &x) |
bool | Contains (const T &v) const |
template<class BP > | |
bool | Contains (const T &v, BP p) const |
bool | Contains (const T *p) const |
size_type | Count (const T &v) const |
template<class BP > | |
size_type | Count (const T &v, BP p) const |
size_type | Count (const T *p) const |
template<class UP > | |
size_type | CountIf (UP p) const |
void | Delete () |
void | Delete (const T &v) |
template<class BP > | |
void | Delete (const T &v, BP p) |
void | Delete (iterator i, iterator j) |
void | Delete (iterator i, size_type n=1) |
void | Destroy () |
void | Destroy (const T &v) |
template<class BP > | |
void | Destroy (const T &v, BP p) |
void | Destroy (iterator i, iterator j) |
void | Destroy (iterator i, size_type n=1) |
const_iterator | End () const |
const_iterator | end () const |
void | EnsureUnique () |
void | Fill (const T &v) |
const T * | First () const |
template<class F > | |
const_iterator | FirstThat (F f) const |
uint64 | Hash (uint64 seed=0) const |
uint32 | Hash32 (uint32 seed=0) const |
uint64 | Hash64 (uint64 seed=0) const |
void | Import (iterator i, iterator j) |
bool | IsAliasOf (const IndirectSortedArray &x) const |
bool | IsEmpty () const |
bool | IsUnique () const |
bool | IsValid () const |
const T * | Last () const |
template<class F > | |
const_iterator | LastThat (F f) const |
size_type | Length () const |
size_type | LowerBound () const |
const_iterator | MaxItem () const |
template<class BP > | |
const_iterator | MaxItem (BP p) const |
const_iterator | MinItem () const |
template<class BP > | |
const_iterator | MinItem (BP p) const |
iterator | MutableAt (size_type i) |
iterator | MutableBegin () |
iterator | MutableEnd () |
T * | MutableFirst () |
iterator | MutableIterator (const_iterator i) |
T * | MutableLast () |
reverse_iterator | MutableReverseBegin () |
reverse_iterator | MutableReverseEnd () |
const T * | operator* () const |
IndirectSortedArray & | operator= (array_implementation &&x) |
IndirectSortedArray & | operator= (const array_implementation &x) |
IndirectSortedArray & | operator= (const IndirectSortedArray &x) |
IndirectSortedArray & | operator= (IndirectSortedArray &&x) |
const T * | operator[] (size_type i) const |
void | Pack () |
iterator | Release () |
void | Remove (const T &v) |
template<class BP > | |
void | Remove (const T &v, BP p) |
void | Remove (const T *p) |
void | Remove (const_iterator i, const_iterator j) |
void | Remove (const_iterator i, size_type n=1) |
void | RemoveFirst (size_type n=1) |
void | RemoveLast (size_type n=1) |
void | Reserve (size_type n) |
const_reverse_iterator | ReverseBegin () const |
const_reverse_iterator | ReverseEnd () const |
const_iterator | Search (const T &v) const |
template<class BP > | |
const_iterator | Search (const T &v, BP p) const |
const_iterator | Search (const T *p) const |
const_iterator | SearchLast (const T &v) const |
template<class BP > | |
const_iterator | SearchLast (const T &v, BP p) const |
const_iterator | SearchLast (const T *p) const |
void | SetAllocator (const allocator &a) |
void | Shrink (size_type n=1) |
size_type | Size () const |
void | Sort () |
void | Squeeze () |
template<class S > | |
S & | ToCommaSeparated (S &s) const |
template<class S , typename SP > | |
S & | ToSeparated (S &s, SP separator) const |
template<class S , typename SP , class AF > | |
S & | ToSeparated (S &s, SP separator, AF append) const |
template<class S > | |
S & | ToSpaceSeparated (S &s) const |
template<class S > | |
S & | ToTabSeparated (S &s) const |
void | Transfer (array_implementation &&x) |
void | Transfer (array_implementation &x) |
void | Transfer (IndirectSortedArray &&x) |
void | Transfer (IndirectSortedArray &x) |
void | Truncate (const_iterator i) |
void | UniquifyIterator (iterator &i) |
void | UniquifyIterators (iterator &i, iterator &j) |
size_type | UpperBound () const |
Friends | |
bool | operator< (const array_implementation &x1, const IndirectSortedArray &x2) |
bool | operator< (const IndirectSortedArray &x1, const array_implementation &x2) |
bool | operator< (const IndirectSortedArray &x1, const IndirectSortedArray &x2) |
bool | operator== (const array_implementation &x1, const IndirectSortedArray &x2) |
bool | operator== (const IndirectSortedArray &x1, const array_implementation &x2) |
bool | operator== (const IndirectSortedArray &x1, const IndirectSortedArray &x2) |
void | Swap (IndirectSortedArray &x1, IndirectSortedArray &x2) |
IndirectSortedArray is a generic, finite sorted sequence of pointers to objects, implemented as a reference-counted, dynamic array of T pointers with automatic sorting of inserted array elements. The type A provides dynamic allocation for contiguous sequences of void* elements (StandardAllocator is used by default).
Ordering of array elements is implemented by indirection, that is, the pointed-to objects are compared for sorting, not the contained pointers.
Unlike ReferenceArray and ReferenceSortedArray, IndirectSortedArray can contain null pointers, which are ignored automatically in all internal operations controlling the implicit ordering of the (indirectly) contained elements.
Definition at line 91 of file IndirectSortedArray.h.
using pcl::IndirectSortedArray< T, A >::allocator = typename array_implementation::allocator |
#
Definition at line 117 of file IndirectSortedArray.h.
using pcl::IndirectSortedArray< T, A >::array_implementation = IndirectArray<T,A> |
#
Definition at line 109 of file IndirectSortedArray.h.
using pcl::IndirectSortedArray< T, A >::block_allocator = typename array_implementation::block_allocator |
#
Definition at line 113 of file IndirectSortedArray.h.
using pcl::IndirectSortedArray< T, A >::const_item_type = typename container_type::const_item_type |
#
Definition at line 105 of file IndirectSortedArray.h.
using pcl::IndirectSortedArray< T, A >::const_iterator = typename array_implementation::const_iterator |
#
Definition at line 125 of file IndirectSortedArray.h.
using pcl::IndirectSortedArray< T, A >::const_reverse_iterator = typename array_implementation::const_reverse_iterator |
#
Definition at line 133 of file IndirectSortedArray.h.
using pcl::IndirectSortedArray< T, A >::container_type = IndirectSortedContainer<T> |
#
Definition at line 97 of file IndirectSortedArray.h.
using pcl::IndirectSortedArray< T, A >::equal = typename array_implementation::equal |
#
Definition at line 137 of file IndirectSortedArray.h.
using pcl::IndirectSortedArray< T, A >::item_type = typename container_type::item_type |
#
Definition at line 101 of file IndirectSortedArray.h.
using pcl::IndirectSortedArray< T, A >::iterator = typename array_implementation::iterator |
#
Definition at line 121 of file IndirectSortedArray.h.
using pcl::IndirectSortedArray< T, A >::less = typename array_implementation::less |
#
Definition at line 141 of file IndirectSortedArray.h.
using pcl::IndirectSortedArray< T, A >::reverse_iterator = typename array_implementation::reverse_iterator |
#
Definition at line 129 of file IndirectSortedArray.h.
|
default |
Constructs an empty indirect sorted array.
|
inlineexplicit |
Constructs an indirect sorted array of length n. All contained pointers are initialized to nullptr
.
Definition at line 155 of file IndirectSortedArray.h.
|
inline |
Constructs an indirect sorted array that stores n copies of a pointer p.
Definition at line 164 of file IndirectSortedArray.h.
|
inline |
Constructs an indirect sorted array as a copy of the sequence of pointers defined by the range [i,j). The stored sequence of pointers is sorted by comparing the pointed objects.
Definition at line 175 of file IndirectSortedArray.h.
References pcl::Sort().
|
default |
Copy constructor.
|
default |
Move constructor.
|
inline |
Destroys an IndirectSortedArray object.
Deallocates the internal array of pointers to objects, but does not destroy the pointed objects. To destroy them, you have to call Destroy() or Delete() explicitly.
Definition at line 198 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 623 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 610 of file IndirectSortedArray.h.
References pcl::IndirectArray< T, A >::Begin(), and pcl::IndirectArray< T, A >::End().
|
inline |
#
Definition at line 630 of file IndirectSortedArray.h.
|
inline |
|
inline |
#
Definition at line 296 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 895 of file IndirectSortedArray.h.
|
inline |
|
inline |
#
Definition at line 486 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 556 of file IndirectSortedArray.h.
|
inline |
|
inline |
#
Definition at line 310 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 261 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 345 of file IndirectSortedArray.h.
|
inline |
STL-compatible iteration. Equivalent to Begin() const.
Definition at line 458 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 254 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 766 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 573 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 588 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 581 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 1023 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 1038 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 1030 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 918 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 934 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 926 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 942 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 818 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 797 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 809 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 780 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 773 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 858 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 839 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 850 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 832 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 825 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 359 of file IndirectSortedArray.h.
|
inline |
STL-compatible iteration. Equivalent to End() const.
Definition at line 466 of file IndirectSortedArray.h.
|
inline |
Ensures that this indirect array uniquely references its contained data pointers.
If necessary, this member function generates a duplicate of the array of pointers, references it, and then decrements the reference counter of the original pointers array.
Definition at line 231 of file IndirectSortedArray.h.
|
inline |
Sets all objects contained by this array equal to v.
Definition at line 887 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 401 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 903 of file IndirectSortedArray.h.
|
inline |
Returns a non-cryptographic hash value computed for this indirect array. This function is a synonym for Hash64().
Definition at line 1244 of file IndirectSortedArray.h.
References pcl::Hash64().
|
inline |
Returns a 32-bit non-cryptographic hash value computed for this indirect array.
This function calls pcl::Hash32() for the internal array of pointers, not for the pointed objects.
The seed parameter can be used to generate repeatable hash values. It can also be set to a random value in compromised environments.
Definition at line 1235 of file IndirectSortedArray.h.
|
inline |
Returns a 64-bit non-cryptographic hash value computed for this indirect array.
This function calls pcl::Hash64() for the internal array of pointers, not for the pointed objects.
The seed parameter can be used to generate repeatable hash values. It can also be set to a random value in compromised environments.
Definition at line 1220 of file IndirectSortedArray.h.
|
inline |
|
inline |
Returns true iff this indirect sorted array is an alias of the indirect sorted array x.
Two objects are aliases if both share the same data. Two indirect containers are aliases if they share a unique set of data pointers.
Definition at line 218 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 275 of file IndirectSortedArray.h.
|
inline |
Returns true iff this indirect sorted array uniquely references its contained array of data pointers.
Definition at line 206 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 268 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 415 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 911 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 247 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 282 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 964 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 972 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 949 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 957 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 317 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 352 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 366 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 408 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 324 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 422 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 380 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 394 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 338 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 532 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 516 of file IndirectSortedArray.h.
|
inline |
Copy assignment operator.
Causes this indirect array to reference the same set of pointers as another array x. Returns a reference to this object.
Definition at line 478 of file IndirectSortedArray.h.
|
inline |
Move assignment operator. Returns a reference to this object.
Definition at line 494 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 331 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 865 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 603 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 742 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 752 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 759 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 674 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 667 of file IndirectSortedArray.h.
|
inline |
Removes a contiguous leading sequence of n existing pointers from this indirect sorted array. This operation is equivalent to:
If the specified count n is greater than or equal to the length of this array, this function calls Clear() to yield an empty array.
Only pointers are removed by this function; the pointed objects are not affected in any way.
Definition at line 691 of file IndirectSortedArray.h.
|
inline |
Removes a contiguous trailing sequence of n existing pointers from this indirect sorted array. This operation is equivalent to:
If the specified count n is greater than or equal to the length of this array, this function calls Clear() to yield an empty array.
Only pointers are removed by this function; the pointed objects are not affected in any way.
Definition at line 708 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 872 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 373 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 387 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 979 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 994 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 986 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 1001 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 1016 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 1008 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 303 of file IndirectSortedArray.h.
|
inline |
Removes a contiguous trailing sequence of n existing pointers from this indirect array. This function is a synonym for RemoveLast().
Definition at line 735 of file IndirectSortedArray.h.
|
inline |
Returns the total number of bytes required to store the array of data pointers in this indirect array.
Definition at line 240 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 1045 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 879 of file IndirectSortedArray.h.
|
inline |
Generates a comma-separated sequence of string tokens. Returns a reference to the target string s.
This function is equivalent to:
Definition at line 1177 of file IndirectSortedArray.h.
|
inline |
Generates a sequence of string tokens separated with the specified separator string. Returns a reference to the target string s.
For each non-null pointer in this indirect array, this function appends a string representation of the pointed object (known as a token) to the target string s. If the array contains more than one non-null pointer, successive tokens are separated with the specified separator.
The string type S must have a meaningful Append() member function and type conversion semantics to transform an array element to a string. The standard String and IsoString PCL classes provide the required functionality for most scalar types, although it is probably better to use String::ToSeparated() and IsoString::ToSeparated() instead of calling these functions directly.
Definition at line 1135 of file IndirectSortedArray.h.
|
inline |
Generates a sequence of string tokens separated with the specified separator string by calling an append function. Returns a reference to the target string s.
For each non-null pointer p in this indirect array, this function appends a string representation of the pointed object (known as a token) to the target string s by calling the append function:
If the array contains more than one non-null pointer, successive tokens are separated by calling:
The string type S must have type conversion semantics to transform an array element to a string. The standard String and IsoString PCL classes provide the required functionality for most scalar types, although it is probably easier to use String::ToSeparated() and IsoString::ToSeparated() instead of calling these functions directly.
Definition at line 1163 of file IndirectSortedArray.h.
|
inline |
Generates a space-separated sequence of string tokens. Returns a reference to the target string s.
This function is equivalent to:
Definition at line 1191 of file IndirectSortedArray.h.
|
inline |
Generates a tabulator-separated sequence of string tokens. Returns a reference to the target string s.
This function is equivalent to:
Definition at line 1205 of file IndirectSortedArray.h.
|
inline |
|
inline |
|
inline |
#
Definition at line 509 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 502 of file IndirectSortedArray.h.
|
inline |
Removes a trailing sequence of contiguous pointers from the specified iterator of this indirect array. This operation is equivalent to:
If the specified iterator is located at or after the end of this array, this function does nothing. Otherwise the iterator is constrained to stay in the range [Begin(),End()) of existing array elements.
Only pointers are removed by this function; the pointed objects are not affected in any way.
Definition at line 726 of file IndirectSortedArray.h.
|
inline |
Ensures that the specified iterator points to a uniquely referenced pointer. If necessary, this function builds a new, uniquely referenced copy of this indirect array by calling EnsureUnique().
If the iterator i is changed, it is guaranteed to point to the pointer at the same array index it was pointing to before calling this function.
Definition at line 435 of file IndirectSortedArray.h.
|
inline |
Ensures that the specified iterators point to uniquely referenced pointers. If necessary, this function builds a new, uniquely referenced copy of this indirect array by calling EnsureUnique().
If the iterators i and j are changed, they are guaranteed to point to the pointers at the same array indices they were pointing to before calling this function.
Definition at line 449 of file IndirectSortedArray.h.
|
inline |
#
Definition at line 289 of file IndirectSortedArray.h.
|
friend |
Exchanges two indirect sorted arrays x1 and x2.
Definition at line 1053 of file IndirectSortedArray.h.