PCL
pcl::SortedArray< T, A > Class Template Reference

Generic dynamic sorted array. More...

#include <SortedArray.h>

+ Inheritance diagram for pcl::SortedArray< T, A >:

Public Types

typedef array_implementation::allocator allocator
 
typedef Array< T, A > array_implementation
 
typedef array_implementation::block_allocator block_allocator
 
typedef array_implementation::const_iterator const_iterator
 
typedef array_implementation::const_reverse_iterator const_reverse_iterator
 
typedef array_implementation::iterator iterator
 
typedef array_implementation::reverse_iterator reverse_iterator
 

Public Member Functions

 SortedArray ()=default
 
 SortedArray (size_type n)
 
 SortedArray (size_type n, const T &v)
 
template<class FI >
 SortedArray (FI i, FI j)
 
template<typename T1 >
 SortedArray (std::initializer_list< T1 > l)
 
 SortedArray (const SortedArray &)=default
 
 SortedArray (SortedArray &&)=default
 
 ~SortedArray ()
 
void Add (const SortedArray &x)
 
void Add (const Array< T, A > &x)
 
const_iterator Add (const T &v, size_type n=1)
 
template<class FI >
void Add (FI i, FI j)
 
template<class F >
void Apply (F f) const
 
void Assign (const SortedArray &x)
 
void Assign (const array_implementation &x)
 
void Assign (const T &v, 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 ()
 
bool Contains (const T &v) const
 
template<class BP >
bool Contains (const T &v, BP p) const
 
size_type Count (const T &v) const
 
template<class BP >
size_type Count (const T &v, BP p) const
 
template<class UP >
size_type CountIf (UP p) const
 
const_iterator End () const
 
const_iterator end () const
 
void EnsureUnique ()
 
void Fill (const T &v)
 
template<class F >
const_iterator FirstThat (F f) const
 
const allocatorGetAllocator () 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 SortedArray &x) const
 
bool IsEmpty () const
 
bool IsUnique () const
 
bool IsValid () 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 ()
 
iterator MutableIterator (const_iterator i)
 
reverse_iterator MutableReverseBegin ()
 
reverse_iterator MutableReverseEnd ()
 
const T & operator* () const
 
SortedArrayoperator= (const SortedArray &x)
 
SortedArrayoperator= (SortedArray &&x)
 
SortedArrayoperator= (const array_implementation &x)
 
SortedArrayoperator= (array_implementation &&x)
 
const T & operator[] (size_type i) const
 
iterator Release ()
 
void Remove (const_iterator i, size_type n=1)
 
void Remove (const_iterator i, const_iterator j)
 
void Remove (const T &v)
 
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 SearchLast (const T &v) const
 
template<class BP >
const_iterator SearchLast (const T &v, BP 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 >
S & ToNewLineSeparated (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 (SortedArray &x)
 
void Transfer (SortedArray &&x)
 
void Transfer (array_implementation &x)
 
void Transfer (array_implementation &&x)
 
void Truncate (const_iterator i)
 
void UniquifyIterator (iterator &i)
 
void UniquifyIterators (iterator &i, iterator &j)
 
size_type UpperBound () const
 

Friends

bool operator< (const SortedArray &x1, const SortedArray &x2)
 
bool operator< (const SortedArray &x1, const array_implementation &x2)
 
bool operator< (const array_implementation &x1, const SortedArray &x2)
 
bool operator== (const SortedArray &x1, const SortedArray &x2)
 
bool operator== (const SortedArray &x1, const array_implementation &x2)
 
bool operator== (const array_implementation &x1, const SortedArray &x2)
 
void Swap (SortedArray &x1, SortedArray &x2)
 

Detailed Description

template<class T, class A = StandardAllocator>
class pcl::SortedArray< T, A >

SortedArray is a generic, finite sorted sequence of objects, implemented as a reference-counted, dynamic array of T instances with automatic sorting of inserted array elements. The type A provides dynamic allocation for contiguous sequences of elements of type T (StandardAllocator is used by default).

See also
Array, ReferenceArray, ReferenceSortedArray, IndirectArray, IndirectSortedArray

Definition at line 82 of file SortedArray.h.

Member Typedef Documentation

◆ allocator

template<class T, class A = StandardAllocator>
typedef array_implementation::allocator pcl::SortedArray< T, A >::allocator

#

Definition at line 98 of file SortedArray.h.

◆ array_implementation

template<class T, class A = StandardAllocator>
typedef Array<T,A> pcl::SortedArray< T, A >::array_implementation

#

Definition at line 88 of file SortedArray.h.

◆ block_allocator

template<class T, class A = StandardAllocator>
typedef array_implementation::block_allocator pcl::SortedArray< T, A >::block_allocator

#

Definition at line 93 of file SortedArray.h.

◆ const_iterator

template<class T, class A = StandardAllocator>
typedef array_implementation::const_iterator pcl::SortedArray< T, A >::const_iterator

#

Definition at line 108 of file SortedArray.h.

◆ const_reverse_iterator

template<class T, class A = StandardAllocator>
typedef array_implementation::const_reverse_iterator pcl::SortedArray< T, A >::const_reverse_iterator

#

Definition at line 118 of file SortedArray.h.

◆ iterator

template<class T, class A = StandardAllocator>
typedef array_implementation::iterator pcl::SortedArray< T, A >::iterator

#

Definition at line 103 of file SortedArray.h.

◆ reverse_iterator

template<class T, class A = StandardAllocator>
typedef array_implementation::reverse_iterator pcl::SortedArray< T, A >::reverse_iterator

#

Definition at line 113 of file SortedArray.h.

Constructor & Destructor Documentation

◆ SortedArray() [1/7]

template<class T, class A = StandardAllocator>
pcl::SortedArray< T, A >::SortedArray ( )
default

Constructs an empty sorted array.

◆ SortedArray() [2/7]

template<class T, class A = StandardAllocator>
pcl::SortedArray< T, A >::SortedArray ( size_type  n)
inlineexplicit

Constructs a sorted array of n default-constructed objects.

Definition at line 131 of file SortedArray.h.

◆ SortedArray() [3/7]

template<class T, class A = StandardAllocator>
pcl::SortedArray< T, A >::SortedArray ( size_type  n,
const T &  v 
)
inline

Constructs a sorted array of n copies of an object v.

Definition at line 139 of file SortedArray.h.

◆ SortedArray() [4/7]

template<class T, class A = StandardAllocator>
template<class FI >
pcl::SortedArray< T, A >::SortedArray ( FI  i,
FI  j 
)
inline

Constructs a sorted array that stores a sorted copy of the sequence of objects defined by the range [i,j) of forward iterators.

Definition at line 149 of file SortedArray.h.

◆ SortedArray() [5/7]

template<class T, class A = StandardAllocator>
template<typename T1 >
pcl::SortedArray< T, A >::SortedArray ( std::initializer_list< T1 >  l)
inline

Constructs a sorted array that stores a sorted copy of the objects in the specified initializer list l.

This constructor is equivalent to:

SortedArray( l.begin(), l.end() )

Definition at line 164 of file SortedArray.h.

◆ SortedArray() [6/7]

template<class T, class A = StandardAllocator>
pcl::SortedArray< T, A >::SortedArray ( const SortedArray< T, A > &  )
default

Copy constructor.

◆ SortedArray() [7/7]

template<class T, class A = StandardAllocator>
pcl::SortedArray< T, A >::SortedArray ( SortedArray< T, A > &&  )
default

Move constructor.

◆ ~SortedArray()

template<class T, class A = StandardAllocator>
pcl::SortedArray< T, A >::~SortedArray ( )
inline

Destroys a SortedArray object. Destroys and deallocates all contained objects.

Definition at line 183 of file SortedArray.h.

Member Function Documentation

◆ Add() [1/4]

template<class T, class A = StandardAllocator>
void pcl::SortedArray< T, A >::Add ( const SortedArray< T, A > &  x)
inline

#

Definition at line 541 of file SortedArray.h.

Referenced by pcl::operator<<().

◆ Add() [2/4]

template<class T, class A = StandardAllocator>
void pcl::SortedArray< T, A >::Add ( const Array< T, A > &  x)
inline

#

Definition at line 553 of file SortedArray.h.

◆ Add() [3/4]

template<class T, class A = StandardAllocator>
const_iterator pcl::SortedArray< T, A >::Add ( const T &  v,
size_type  n = 1 
)
inline

#

Definition at line 560 of file SortedArray.h.

◆ Add() [4/4]

template<class T, class A = StandardAllocator>
template<class FI >
void pcl::SortedArray< T, A >::Add ( FI  i,
FI  j 
)
inline

#

Definition at line 568 of file SortedArray.h.

◆ Apply()

template<class T, class A = StandardAllocator>
template<class F >
void pcl::SortedArray< T, A >::Apply ( f) const
inline

#

Definition at line 679 of file SortedArray.h.

◆ Assign() [1/4]

template<class T, class A = StandardAllocator>
void pcl::SortedArray< T, A >::Assign ( const SortedArray< T, A > &  x)
inline

#

Definition at line 440 of file SortedArray.h.

◆ Assign() [2/4]

template<class T, class A = StandardAllocator>
void pcl::SortedArray< T, A >::Assign ( const array_implementation x)
inline

#

Definition at line 478 of file SortedArray.h.

◆ Assign() [3/4]

template<class T, class A = StandardAllocator>
void pcl::SortedArray< T, A >::Assign ( const T &  v,
size_type  n = 1 
)
inline

#

Definition at line 510 of file SortedArray.h.

◆ Assign() [4/4]

template<class T, class A = StandardAllocator>
template<class FI >
void pcl::SortedArray< T, A >::Assign ( FI  i,
FI  j 
)
inline

#

Definition at line 518 of file SortedArray.h.

◆ At()

template<class T, class A = StandardAllocator>
const_iterator pcl::SortedArray< T, A >::At ( size_type  i) const
inline

#

Definition at line 292 of file SortedArray.h.

◆ Available()

template<class T, class A = StandardAllocator>
size_type pcl::SortedArray< T, A >::Available ( ) const
inline

#

Definition at line 243 of file SortedArray.h.

◆ Begin()

template<class T, class A = StandardAllocator>
const_iterator pcl::SortedArray< T, A >::Begin ( ) const
inline

#

Definition at line 327 of file SortedArray.h.

Referenced by pcl::SortedArray< Node * >::Add().

◆ begin()

template<class T, class A = StandardAllocator>
const_iterator pcl::SortedArray< T, A >::begin ( ) const
inline

STL-compatible iteration. Equivalent to Begin() const.

Definition at line 412 of file SortedArray.h.

◆ Capacity()

template<class T, class A = StandardAllocator>
size_type pcl::SortedArray< T, A >::Capacity ( ) const
inline

#

Definition at line 236 of file SortedArray.h.

◆ Clear()

template<class T, class A = StandardAllocator>
void pcl::SortedArray< T, A >::Clear ( )
inline

#

Definition at line 649 of file SortedArray.h.

◆ Contains() [1/2]

template<class T, class A = StandardAllocator>
bool pcl::SortedArray< T, A >::Contains ( const T &  v) const
inline

#

Definition at line 786 of file SortedArray.h.

◆ Contains() [2/2]

template<class T, class A = StandardAllocator>
template<class BP >
bool pcl::SortedArray< T, A >::Contains ( const T &  v,
BP  p 
) const
inline

#

Definition at line 794 of file SortedArray.h.

◆ Count() [1/2]

template<class T, class A = StandardAllocator>
size_type pcl::SortedArray< T, A >::Count ( const T &  v) const
inline

#

Definition at line 702 of file SortedArray.h.

◆ Count() [2/2]

template<class T, class A = StandardAllocator>
template<class BP >
size_type pcl::SortedArray< T, A >::Count ( const T &  v,
BP  p 
) const
inline

#

Definition at line 711 of file SortedArray.h.

◆ CountIf()

template<class T, class A = StandardAllocator>
template<class UP >
size_type pcl::SortedArray< T, A >::CountIf ( UP  p) const
inline

#

Definition at line 719 of file SortedArray.h.

◆ End()

template<class T, class A = StandardAllocator>
const_iterator pcl::SortedArray< T, A >::End ( ) const
inline

#

Definition at line 341 of file SortedArray.h.

Referenced by pcl::SortedArray< Node * >::Add().

◆ end()

template<class T, class A = StandardAllocator>
const_iterator pcl::SortedArray< T, A >::end ( ) const
inline

STL-compatible iteration. Equivalent to End() const.

Definition at line 420 of file SortedArray.h.

◆ EnsureUnique()

template<class T, class A = StandardAllocator>
void pcl::SortedArray< T, A >::EnsureUnique ( )
inline

Ensures that this array uniquely references its contained data.

If necessary, this member function generates a duplicate of the array data, references it, and then decrements the reference counter of the original array data.

Definition at line 212 of file SortedArray.h.

◆ Fill()

template<class T, class A = StandardAllocator>
void pcl::SortedArray< T, A >::Fill ( const T &  v)
inline

Sets all objects contained by this array equal to v.

Definition at line 671 of file SortedArray.h.

◆ FirstThat()

template<class T, class A = StandardAllocator>
template<class F >
const_iterator pcl::SortedArray< T, A >::FirstThat ( f) const
inline

#

Definition at line 687 of file SortedArray.h.

◆ GetAllocator()

template<class T, class A = StandardAllocator>
const allocator& pcl::SortedArray< T, A >::GetAllocator ( ) const
inline

#

Definition at line 278 of file SortedArray.h.

◆ Hash()

template<class T, class A = StandardAllocator>
uint64 pcl::SortedArray< T, A >::Hash ( uint64  seed = 0) const
inline

Returns a non-cryptographic hash value computed for this array. This function is a synonym for Hash64().

Definition at line 1005 of file SortedArray.h.

◆ Hash32()

template<class T, class A = StandardAllocator>
uint32 pcl::SortedArray< T, A >::Hash32 ( uint32  seed = 0) const
inline

Returns a 32-bit non-cryptographic hash value computed for this array.

This function calls pcl::Hash32() for the internal array buffer.

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 996 of file SortedArray.h.

◆ Hash64()

template<class T, class A = StandardAllocator>
uint64 pcl::SortedArray< T, A >::Hash64 ( uint64  seed = 0) const
inline

Returns a 64-bit non-cryptographic hash value computed for this array.

This function calls pcl::Hash64() for the internal array buffer.

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 983 of file SortedArray.h.

◆ Import()

template<class T, class A = StandardAllocator>
void pcl::SortedArray< T, A >::Import ( iterator  i,
iterator  j 
)
inline

#

Definition at line 526 of file SortedArray.h.

◆ IsAliasOf()

template<class T, class A = StandardAllocator>
bool pcl::SortedArray< T, A >::IsAliasOf ( const SortedArray< T, A > &  x) const
inline

Returns true iff this sorted array is an alias of a sorted array x.

Two objects are aliases if both of them share the same data.

Definition at line 200 of file SortedArray.h.

◆ IsEmpty()

template<class T, class A = StandardAllocator>
bool pcl::SortedArray< T, A >::IsEmpty ( ) const
inline

#

Definition at line 257 of file SortedArray.h.

◆ IsUnique()

template<class T, class A = StandardAllocator>
bool pcl::SortedArray< T, A >::IsUnique ( ) const
inline

Returns true iff this array uniquely references its contained data.

Definition at line 190 of file SortedArray.h.

◆ IsValid()

template<class T, class A = StandardAllocator>
bool pcl::SortedArray< T, A >::IsValid ( ) const
inline

#

Definition at line 250 of file SortedArray.h.

◆ LastThat()

template<class T, class A = StandardAllocator>
template<class F >
const_iterator pcl::SortedArray< T, A >::LastThat ( f) const
inline

#

Definition at line 695 of file SortedArray.h.

◆ Length()

template<class T, class A = StandardAllocator>
size_type pcl::SortedArray< T, A >::Length ( ) const
inline

Returns the length of this sorted array.

Definition at line 229 of file SortedArray.h.

◆ LowerBound()

template<class T, class A = StandardAllocator>
size_type pcl::SortedArray< T, A >::LowerBound ( ) const
inline

#

Definition at line 264 of file SortedArray.h.

◆ MaxItem() [1/2]

template<class T, class A = StandardAllocator>
const_iterator pcl::SortedArray< T, A >::MaxItem ( ) const
inline

#

Definition at line 741 of file SortedArray.h.

◆ MaxItem() [2/2]

template<class T, class A = StandardAllocator>
template<class BP >
const_iterator pcl::SortedArray< T, A >::MaxItem ( BP  p) const
inline

#

Definition at line 749 of file SortedArray.h.

◆ MinItem() [1/2]

template<class T, class A = StandardAllocator>
const_iterator pcl::SortedArray< T, A >::MinItem ( ) const
inline

#

Definition at line 726 of file SortedArray.h.

◆ MinItem() [2/2]

template<class T, class A = StandardAllocator>
template<class BP >
const_iterator pcl::SortedArray< T, A >::MinItem ( BP  p) const
inline

#

Definition at line 734 of file SortedArray.h.

◆ MutableAt()

template<class T, class A = StandardAllocator>
iterator pcl::SortedArray< T, A >::MutableAt ( size_type  i)
inline

#

Definition at line 299 of file SortedArray.h.

◆ MutableBegin()

template<class T, class A = StandardAllocator>
iterator pcl::SortedArray< T, A >::MutableBegin ( )
inline

#

Definition at line 334 of file SortedArray.h.

◆ MutableEnd()

template<class T, class A = StandardAllocator>
iterator pcl::SortedArray< T, A >::MutableEnd ( )
inline

#

Definition at line 348 of file SortedArray.h.

◆ MutableIterator()

template<class T, class A = StandardAllocator>
iterator pcl::SortedArray< T, A >::MutableIterator ( const_iterator  i)
inline

#

Definition at line 306 of file SortedArray.h.

◆ MutableReverseBegin()

template<class T, class A = StandardAllocator>
reverse_iterator pcl::SortedArray< T, A >::MutableReverseBegin ( )
inline

#

Definition at line 362 of file SortedArray.h.

◆ MutableReverseEnd()

template<class T, class A = StandardAllocator>
reverse_iterator pcl::SortedArray< T, A >::MutableReverseEnd ( )
inline

#

Definition at line 376 of file SortedArray.h.

◆ operator*()

template<class T, class A = StandardAllocator>
const T& pcl::SortedArray< T, A >::operator* ( ) const
inline

#

Definition at line 320 of file SortedArray.h.

◆ operator=() [1/4]

template<class T, class A = StandardAllocator>
SortedArray& pcl::SortedArray< T, A >::operator= ( const SortedArray< T, A > &  x)
inline

Copy assignment operator.

Causes this sorted array to reference the same data as another sorted array x. Returns a reference to this object.

Definition at line 432 of file SortedArray.h.

◆ operator=() [2/4]

template<class T, class A = StandardAllocator>
SortedArray& pcl::SortedArray< T, A >::operator= ( SortedArray< T, A > &&  x)
inline

Move assignment operator. Returns a reference to this object.

Definition at line 448 of file SortedArray.h.

◆ operator=() [3/4]

template<class T, class A = StandardAllocator>
SortedArray& pcl::SortedArray< T, A >::operator= ( const array_implementation x)
inline

#

Definition at line 470 of file SortedArray.h.

◆ operator=() [4/4]

template<class T, class A = StandardAllocator>
SortedArray& pcl::SortedArray< T, A >::operator= ( array_implementation &&  x)
inline

#

Definition at line 486 of file SortedArray.h.

◆ operator[]()

template<class T, class A = StandardAllocator>
const T& pcl::SortedArray< T, A >::operator[] ( size_type  i) const
inline

#

Definition at line 313 of file SortedArray.h.

◆ Release()

template<class T, class A = StandardAllocator>
iterator pcl::SortedArray< T, A >::Release ( )
inline

#

Definition at line 534 of file SortedArray.h.

◆ Remove() [1/3]

template<class T, class A = StandardAllocator>
void pcl::SortedArray< T, A >::Remove ( const_iterator  i,
size_type  n = 1 
)
inline

#

Definition at line 597 of file SortedArray.h.

◆ Remove() [2/3]

template<class T, class A = StandardAllocator>
void pcl::SortedArray< T, A >::Remove ( const_iterator  i,
const_iterator  j 
)
inline

#

Definition at line 604 of file SortedArray.h.

◆ Remove() [3/3]

template<class T, class A = StandardAllocator>
void pcl::SortedArray< T, A >::Remove ( const T &  v)
inline

#

Definition at line 640 of file SortedArray.h.

◆ Reserve()

template<class T, class A = StandardAllocator>
void pcl::SortedArray< T, A >::Reserve ( size_type  n)
inline

#

Definition at line 656 of file SortedArray.h.

◆ ReverseBegin()

template<class T, class A = StandardAllocator>
const_reverse_iterator pcl::SortedArray< T, A >::ReverseBegin ( ) const
inline

#

Definition at line 355 of file SortedArray.h.

◆ ReverseEnd()

template<class T, class A = StandardAllocator>
const_reverse_iterator pcl::SortedArray< T, A >::ReverseEnd ( ) const
inline

#

Definition at line 369 of file SortedArray.h.

◆ Search() [1/2]

template<class T, class A = StandardAllocator>
const_iterator pcl::SortedArray< T, A >::Search ( const T &  v) const
inline

#

Definition at line 756 of file SortedArray.h.

◆ Search() [2/2]

template<class T, class A = StandardAllocator>
template<class BP >
const_iterator pcl::SortedArray< T, A >::Search ( const T &  v,
BP  p 
) const
inline

#

Definition at line 764 of file SortedArray.h.

◆ SearchLast() [1/2]

template<class T, class A = StandardAllocator>
const_iterator pcl::SortedArray< T, A >::SearchLast ( const T &  v) const
inline

#

Definition at line 771 of file SortedArray.h.

◆ SearchLast() [2/2]

template<class T, class A = StandardAllocator>
template<class BP >
const_iterator pcl::SortedArray< T, A >::SearchLast ( const T &  v,
BP  p 
) const
inline

#

Definition at line 779 of file SortedArray.h.

◆ SetAllocator()

template<class T, class A = StandardAllocator>
void pcl::SortedArray< T, A >::SetAllocator ( const allocator a)
inline

#

Definition at line 285 of file SortedArray.h.

◆ Shrink()

template<class T, class A = StandardAllocator>
void pcl::SortedArray< T, A >::Shrink ( size_type  n = 1)
inline

Removes a contiguous trailing sequence of n existing objects from this sorted array. This operation is equivalent to:

Truncate( End() - n )

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.

Definition at line 633 of file SortedArray.h.

◆ Size()

template<class T, class A = StandardAllocator>
size_type pcl::SortedArray< T, A >::Size ( ) const
inline

Returns the total number of bytes required to store the objects contained by this sorted array.

Definition at line 221 of file SortedArray.h.

◆ Sort()

template<class T, class A = StandardAllocator>
void pcl::SortedArray< T, A >::Sort ( )
inline

#

Definition at line 801 of file SortedArray.h.

◆ Squeeze()

template<class T, class A = StandardAllocator>
void pcl::SortedArray< T, A >::Squeeze ( )
inline

#

Definition at line 663 of file SortedArray.h.

◆ ToCommaSeparated()

template<class T, class A = StandardAllocator>
template<class S >
S& pcl::SortedArray< T, A >::ToCommaSeparated ( S &  s) const
inline

Generates a comma-separated sequence of string tokens. Returns a reference to the target string s.

This function is equivalent to:

ToSeparated( s, ',' );

Definition at line 928 of file SortedArray.h.

◆ ToNewLineSeparated()

template<class T, class A = StandardAllocator>
template<class S >
S& pcl::SortedArray< T, A >::ToNewLineSeparated ( S &  s) const
inline

Generates a newline-separated sequence of string tokens. Returns a reference to the target string s.

This function is equivalent to:

ToSeparated( s, '\n' );

Definition at line 970 of file SortedArray.h.

◆ ToSeparated() [1/2]

template<class T, class A = StandardAllocator>
template<class S , typename SP >
S& pcl::SortedArray< T, A >::ToSeparated ( S &  s,
SP  separator 
) const
inline

Generates a sequence of string tokens separated with the specified separator string. Returns a reference to the target string s.

For each element in this array, this function appends a string representation (known as a token) to the target string s. If the array contains more than one element, 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 886 of file SortedArray.h.

◆ ToSeparated() [2/2]

template<class T, class A = StandardAllocator>
template<class S , typename SP , class AF >
S& pcl::SortedArray< T, A >::ToSeparated ( S &  s,
SP  separator,
AF  append 
) const
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 element x in this array, this function appends a string representation (known as a token) to the target string s by calling the append function:

append( s, S( x ) );

If the array contains more than one element, successive tokens are separated by calling:

append( s, S( separator ) );

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 914 of file SortedArray.h.

◆ ToSpaceSeparated()

template<class T, class A = StandardAllocator>
template<class S >
S& pcl::SortedArray< T, A >::ToSpaceSeparated ( S &  s) const
inline

Generates a space-separated sequence of string tokens. Returns a reference to the target string s.

This function is equivalent to:

ToSeparated( s, ' ' );

Definition at line 942 of file SortedArray.h.

◆ ToTabSeparated()

template<class T, class A = StandardAllocator>
template<class S >
S& pcl::SortedArray< T, A >::ToTabSeparated ( S &  s) const
inline

Generates a tabulator-separated sequence of string tokens. Returns a reference to the target string s.

This function is equivalent to:

ToSeparated( s, '\t' );

Definition at line 956 of file SortedArray.h.

◆ Transfer() [1/4]

template<class T, class A = StandardAllocator>
void pcl::SortedArray< T, A >::Transfer ( SortedArray< T, A > &  x)
inline

#

Definition at line 456 of file SortedArray.h.

◆ Transfer() [2/4]

template<class T, class A = StandardAllocator>
void pcl::SortedArray< T, A >::Transfer ( SortedArray< T, A > &&  x)
inline

#

Definition at line 463 of file SortedArray.h.

◆ Transfer() [3/4]

template<class T, class A = StandardAllocator>
void pcl::SortedArray< T, A >::Transfer ( array_implementation x)
inline

#

Definition at line 494 of file SortedArray.h.

◆ Transfer() [4/4]

template<class T, class A = StandardAllocator>
void pcl::SortedArray< T, A >::Transfer ( array_implementation &&  x)
inline

#

Definition at line 502 of file SortedArray.h.

◆ Truncate()

template<class T, class A = StandardAllocator>
void pcl::SortedArray< T, A >::Truncate ( const_iterator  i)
inline

Destroys and removes a trailing sequence of contiguous objects from the specified iterator of this array. This operation is equivalent to:

Remove( i, End() )

If the specified iterator i 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.

Definition at line 619 of file SortedArray.h.

◆ UniquifyIterator()

template<class T, class A = StandardAllocator>
void pcl::SortedArray< T, A >::UniquifyIterator ( iterator i)
inline

Ensures that the specified iterator points to a uniquely referenced object. If necessary, this function builds a new, uniquely referenced copy of this array by calling EnsureUnique().

If the iterator i is changed, it is guaranteed to point to the object at the same array index it was pointing to before calling this function.

Definition at line 389 of file SortedArray.h.

◆ UniquifyIterators()

template<class T, class A = StandardAllocator>
void pcl::SortedArray< T, A >::UniquifyIterators ( iterator i,
iterator j 
)
inline

Ensures that the specified iterators point to uniquely referenced objects. If necessary, this function builds a new, uniquely referenced copy of this array by calling EnsureUnique().

If the iterators i and j are changed, they are guaranteed to point to the objects at the same array indices they were pointing to before calling this function.

Definition at line 403 of file SortedArray.h.

◆ UpperBound()

template<class T, class A = StandardAllocator>
size_type pcl::SortedArray< T, A >::UpperBound ( ) const
inline

#

Definition at line 271 of file SortedArray.h.

Friends And Related Function Documentation

◆ Swap

template<class T, class A = StandardAllocator>
void Swap ( SortedArray< T, A > &  x1,
SortedArray< T, A > &  x2 
)
friend

Exchanges two sorted arrays x1 and x2.

Definition at line 809 of file SortedArray.h.


The documentation for this class was generated from the following file: