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

Generic dynamic array. More...

#include <Array.h>

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

Public Types

using allocator = pcl::Allocator< T, A >
 
using block_allocator = A
 
using const_iterator = const T *
 
using const_reverse_iterator = ReverseRandomAccessIterator< const_iterator, const T >
 
using iterator = T *
 
using reverse_iterator = ReverseRandomAccessIterator< iterator, T >
 

Public Member Functions

 Array ()
 
 Array (Array &&x)
 
 Array (const Array &x)
 
template<class FI >
 Array (FI i, FI j)
 
 Array (size_type n)
 
 Array (size_type n, const T &v)
 
template<typename T1 >
 Array (std::initializer_list< T1 > l)
 
 ~Array ()
 
void Add (const Array &x)
 
void Add (const T &v, size_type n=1)
 
template<class FI >
void Add (FI p, FI q)
 
const allocatorAllocator () const noexcept
 
void Append (const Array &x)
 
void Append (const T &v, size_type n=1)
 
template<class FI >
void Append (FI p, FI q)
 
template<class F >
void Apply (F f)
 
template<class F >
void Apply (F f) const noexcept(noexcept(f))
 
void Assign (const Array &x)
 
void Assign (const T &v, size_type n=1)
 
template<class FI >
void Assign (FI i, FI j)
 
iterator At (size_type i)
 
const_iterator At (size_type i) const noexcept
 
size_type Available () const noexcept
 
iterator Begin ()
 
iterator begin ()
 
const_iterator Begin () const noexcept
 
const_iterator begin () const noexcept
 
size_type Capacity () const noexcept
 
void Clear ()
 
const_iterator ConstBegin () const noexcept
 
const_iterator ConstEnd () const noexcept
 
const_reverse_iterator ConstReverseBegin () const noexcept
 
const_reverse_iterator ConstReverseEnd () const noexcept
 
bool Contains (const T &v) const noexcept
 
template<class BP >
bool Contains (const T &v, BP p) const noexcept(noexcept(p))
 
template<class C >
iterator ContainsSubset (const C &c) const noexcept
 
template<class C , class BP >
iterator ContainsSubset (const C &c, BP p) const noexcept(noexcept(p))
 
template<class FI >
iterator ContainsSubset (FI i, FI j) const noexcept
 
template<class FI , class BP >
iterator ContainsSubset (FI i, FI j, BP p) const noexcept(noexcept(p))
 
size_type Count (const T &v) const noexcept
 
template<class BP >
size_type Count (const T &v, BP p) const noexcept(noexcept(p))
 
template<class UP >
size_type CountIf (UP p) const noexcept(noexcept(p))
 
iterator End ()
 
iterator end ()
 
const_iterator End () const noexcept
 
const_iterator end () const noexcept
 
void EnsureUnique ()
 
iterator Expand (size_type n=1)
 
void Fill (const T &v)
 
template<class F >
iterator FirstThat (F f)
 
template<class F >
const_iterator FirstThat (F f) const noexcept(noexcept(f))
 
iterator Grow (iterator i, size_type n=1)
 
uint64 Hash (uint64 seed=0) const noexcept
 
uint32 Hash32 (uint32 seed=0) const noexcept
 
uint64 Hash64 (uint64 seed=0) const
 
void Import (iterator i, iterator j)
 
iterator Insert (iterator i, const Array &x)
 
iterator Insert (iterator i, const T &v, size_type n=1)
 
template<class FI >
iterator Insert (iterator i, FI p, FI q)
 
bool IsAliasOf (const Array &x) const noexcept
 
bool IsEmpty () const noexcept
 
bool IsUnique () const noexcept
 
bool IsValid () const noexcept
 
template<class F >
const_iterator LastThat (F f) const noexcept(noexcept(f))
 
size_type Length () const noexcept
 
size_type LowerBound () const noexcept
 
iterator MaxItem ()
 
const_iterator MaxItem () const noexcept
 
template<class BP >
iterator MaxItem (BP p)
 
template<class BP >
const_iterator MaxItem (BP p) const noexcept(noexcept(p))
 
iterator MinItem ()
 
const_iterator MinItem () const noexcept
 
template<class BP >
iterator MinItem (BP p)
 
template<class BP >
const_iterator MinItem (BP p) const noexcept(noexcept(p))
 
iterator MutableIterator (const_iterator i)
 
T & operator* ()
 
const T & operator* () const noexcept
 
Arrayoperator= (Array &&x)
 
Arrayoperator= (const Array &x)
 
T & operator[] (size_type i)
 
const T & operator[] (size_type i) const noexcept
 
void Prepend (const Array &x)
 
void Prepend (const T &v, size_type n=1)
 
template<class FI >
void Prepend (FI p, FI q)
 
iterator Release ()
 
void Remove (const T &v)
 
template<class BP >
void Remove (const T &v, BP p)
 
void Remove (iterator i, iterator j)
 
void Remove (iterator i, size_type n=1)
 
void RemoveFirst (size_type n=1)
 
void RemoveLast (size_type n=1)
 
iterator Replace (iterator i, iterator j, const Array &x)
 
iterator Replace (iterator i, iterator j, const T &v, size_type n=1)
 
template<class FI >
iterator Replace (iterator i, iterator j, FI p, FI q)
 
void Reserve (size_type n)
 
void Resize (size_type n)
 
void Reverse ()
 
reverse_iterator ReverseBegin ()
 
const_reverse_iterator ReverseBegin () const noexcept
 
reverse_iterator ReverseEnd ()
 
const_reverse_iterator ReverseEnd () const noexcept
 
void Rotate (distance_type n)
 
iterator Search (const T &v)
 
const_iterator Search (const T &v) const noexcept
 
template<class BP >
iterator Search (const T &v, BP p)
 
template<class BP >
const_iterator Search (const T &v, BP p) const noexcept(noexcept(p))
 
iterator SearchLast (const T &v)
 
const_iterator SearchLast (const T &v) const noexcept
 
template<class BP >
iterator SearchLast (const T &v, BP p)
 
template<class BP >
const_iterator SearchLast (const T &v, BP p) const noexcept(noexcept(p))
 
template<class BI >
iterator SearchLastSubset (BI i, BI j)
 
template<class BI >
const_iterator SearchLastSubset (BI i, BI j) const noexcept
 
template<class BI , class BP >
iterator SearchLastSubset (BI i, BI j, BP p)
 
template<class BI , class BP >
const_iterator SearchLastSubset (BI i, BI j, BP p) const noexcept(noexcept(p))
 
template<class C >
iterator SearchLastSubset (const C &x)
 
template<class C >
const_iterator SearchLastSubset (const C &x) const noexcept
 
template<class C , class BP >
iterator SearchLastSubset (const C &x, BP p)
 
template<class C , class BP >
const_iterator SearchLastSubset (const C &x, BP p) const noexcept(noexcept(p))
 
template<class C >
iterator SearchSubset (const C &x)
 
template<class C >
const_iterator SearchSubset (const C &x) const noexcept
 
template<class C , class BP >
iterator SearchSubset (const C &x, BP p)
 
template<class C , class BP >
const_iterator SearchSubset (const C &x, BP p) const noexcept(noexcept(p))
 
template<class FI >
iterator SearchSubset (FI i, FI j)
 
template<class FI >
const_iterator SearchSubset (FI i, FI j) const noexcept
 
template<class FI , class BP >
iterator SearchSubset (FI i, FI j, BP p)
 
template<class FI , class BP >
const_iterator SearchSubset (FI i, FI j, BP p) const noexcept(noexcept(p))
 
void SecureFill (const T &v)
 
void SetAllocator (const allocator &a)
 
void ShiftLeft (const T &v, size_type n=1)
 
void ShiftRight (const T &v, size_type n=1)
 
void Shrink (size_type n=1)
 
size_type Size () const noexcept
 
void Sort ()
 
template<class BP >
void Sort (BP p)
 
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 (Array &&x)
 
void Transfer (Array &x)
 
void Truncate (iterator i)
 
void UniquifyIterator (iterator &i)
 
void UniquifyIterators (iterator &i, iterator &j)
 
size_type UpperBound () const noexcept
 

Friends

void Swap (Array &x1, Array &x2) noexcept
 

Detailed Description

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

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

See also
SortedArray, ReferenceArray, ReferenceSortedArray, IndirectArray, IndirectSortedArray

Definition at line 99 of file Array.h.

Member Typedef Documentation

◆ allocator

template<class T , class A = StandardAllocator>
using pcl::Array< T, A >::allocator = pcl::Allocator<T,A>

#

Definition at line 109 of file Array.h.

◆ block_allocator

template<class T , class A = StandardAllocator>
using pcl::Array< T, A >::block_allocator = A

#

Definition at line 105 of file Array.h.

◆ const_iterator

template<class T , class A = StandardAllocator>
using pcl::Array< T, A >::const_iterator = const T*

#

Definition at line 117 of file Array.h.

◆ const_reverse_iterator

template<class T , class A = StandardAllocator>
using pcl::Array< T, A >::const_reverse_iterator = ReverseRandomAccessIterator<const_iterator, const T>

#

Definition at line 125 of file Array.h.

◆ iterator

template<class T , class A = StandardAllocator>
using pcl::Array< T, A >::iterator = T*

#

Definition at line 113 of file Array.h.

◆ reverse_iterator

template<class T , class A = StandardAllocator>
using pcl::Array< T, A >::reverse_iterator = ReverseRandomAccessIterator<iterator, T>

#

Definition at line 121 of file Array.h.

Constructor & Destructor Documentation

◆ Array() [1/7]

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

Constructs an empty array.

Definition at line 132 of file Array.h.

◆ Array() [2/7]

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

Constructs an array of n default-constructed objects.

Definition at line 141 of file Array.h.

◆ Array() [3/7]

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

Constructs an array with n copies of an object v.

Definition at line 151 of file Array.h.

◆ Array() [4/7]

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

Constructs an array that stores a copy of the objects in the range [i,j) of forward iterators.

Definition at line 163 of file Array.h.

◆ Array() [5/7]

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

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

This constructor is equivalent to:

Array( l.begin(), l.end() )
Array()
Definition: Array.h:132

Definition at line 180 of file Array.h.

◆ Array() [6/7]

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

Copy constructor.

Definition at line 188 of file Array.h.

◆ Array() [7/7]

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

Move constructor.

Definition at line 198 of file Array.h.

◆ ~Array()

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

Destroys an Array object. Destroys and deallocates all contained objects.

Definition at line 208 of file Array.h.

Member Function Documentation

◆ Add() [1/3]

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

A synonym for Append( const Array<>& ).

Definition at line 999 of file Array.h.

◆ Add() [2/3]

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

A synonym for Append( const T&, size_type )

Definition at line 1007 of file Array.h.

◆ Add() [3/3]

template<class T , class A = StandardAllocator>
template<class FI >
void pcl::Array< T, A >::Add ( FI  p,
FI  q 
)
inline

A synonym for Append( FI, FI )

Definition at line 1016 of file Array.h.

◆ Allocator()

template<class T , class A = StandardAllocator>
const allocator& pcl::Array< T, A >::Allocator ( ) const
inlinenoexcept

Returns a reference to the allocator object used by this array.

Definition at line 338 of file Array.h.

◆ Append() [1/3]

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

Appends a copy of the objects stored in the array x to this array.

Definition at line 940 of file Array.h.

◆ Append() [2/3]

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

Appends a contiguous sequence of n copies of the object v to this array.

Definition at line 949 of file Array.h.

◆ Append() [3/3]

template<class T , class A = StandardAllocator>
template<class FI >
void pcl::Array< T, A >::Append ( FI  p,
FI  q 
)
inline

Appends a copy of the sequence of objects defined by the range [p,q) of forward iterators to this array.

Note
p and q must not be iterators into this array.

Definition at line 961 of file Array.h.

◆ Apply() [1/2]

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

Calls f( T& x ) for every object x contained by this array, successively from the first contained object to the last one.

Definition at line 1390 of file Array.h.

◆ Apply() [2/2]

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

Calls f( const T& x ) for every object x contained by this array, successively from the first contained object to the last one.

Definition at line 1401 of file Array.h.

◆ Assign() [1/3]

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

Assigns an array x to this array.

Decrements the reference counter of the current array data, and destroys it if it becomes unreferenced.

Increments the reference counter of the source array's data and references it in this array.

Definition at line 646 of file Array.h.

◆ Assign() [2/3]

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

Replaces the contents of this array with a sequence of n copies of an object v.

Definition at line 698 of file Array.h.

◆ Assign() [3/3]

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

Replaces the contents of this array with a copy of the sequence defined by the range [i,j) of forward iterators.

Note
i and j must not be iterators into this array.

Definition at line 733 of file Array.h.

References pcl::Distance().

◆ At() [1/2]

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

Returns an array iterator located at the specified array index i.

Definition at line 355 of file Array.h.

Referenced by pcl::GenericChebyshevFit< Tx, Ty >::Evaluate(), and pcl::Compression::Unshuffle().

◆ At() [2/2]

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

Returns an immutable array iterator located at the specified index i.

Definition at line 365 of file Array.h.

◆ Available()

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

Returns the length of the space available in this array, or zero if this array cannot contain more objects. The available space is the number of objects that can be added to this array without requiring a reallocation. It is equal to Capacity() - Length() by definition.

Definition at line 286 of file Array.h.

◆ Begin() [1/2]

template<class T , class A = StandardAllocator>
iterator pcl::Array< T, A >::Begin ( )
inline

◆ begin() [1/2]

template<class T , class A = StandardAllocator>
iterator pcl::Array< T, A >::begin ( )
inline

STL-compatible iteration. Equivalent to Begin().

Definition at line 595 of file Array.h.

◆ Begin() [2/2]

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

Returns an immutable iterator located at the beginning of this array.

Definition at line 435 of file Array.h.

◆ begin() [2/2]

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

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

Definition at line 603 of file Array.h.

◆ Capacity()

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

Returns the capacity of this array. The capacity is the maximum number of objects that this array can contain without requiring a reallocation.

Definition at line 275 of file Array.h.

◆ Clear()

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

Removes and possibly destroys all objects contained, yielding an empty array.

If this array is empty, then calling this member function has no effect.

If this array uniquely references its internal array data structure, all objects contained are destroyed and deallocated; otherwise its reference counter is decremented and a new, empty array data structure is created and uniquely referenced.

Definition at line 1173 of file Array.h.

Referenced by pcl::XPSD::SearchData< StarData >::ResetSearchResults().

◆ ConstBegin()

template<class T , class A = StandardAllocator>
const_iterator pcl::Array< T, A >::ConstBegin ( ) const
inlinenoexcept

Returns an immutable iterator located at the beginning of this array.

Definition at line 443 of file Array.h.

Referenced by pcl::Array< T, A >::Replace().

◆ ConstEnd()

template<class T , class A = StandardAllocator>
const_iterator pcl::Array< T, A >::ConstEnd ( ) const
inlinenoexcept

Returns an immutable iterator located at the end of this array.

Definition at line 468 of file Array.h.

Referenced by pcl::Array< T, A >::Replace().

◆ ConstReverseBegin()

template<class T , class A = StandardAllocator>
const_reverse_iterator pcl::Array< T, A >::ConstReverseBegin ( ) const
inlinenoexcept

Returns an immutable reverse iterator located at the reverse beginning of this array.

The reverse beginning corresponds to the last element in the array.

Definition at line 504 of file Array.h.

◆ ConstReverseEnd()

template<class T , class A = StandardAllocator>
const_reverse_iterator pcl::Array< T, A >::ConstReverseEnd ( ) const
inlinenoexcept

Returns an immutable reverse iterator located at the reverse end of this array.

The reverse end corresponds to an (nonexistent) element immediately before the first element in the array.

Definition at line 544 of file Array.h.

◆ Contains() [1/2]

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

#

Definition at line 1787 of file Array.h.

◆ Contains() [2/2]

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

#

Definition at line 1795 of file Array.h.

◆ ContainsSubset() [1/4]

template<class T , class A = StandardAllocator>
template<class C >
iterator pcl::Array< T, A >::ContainsSubset ( const C &  c) const
inlinenoexcept

#

Definition at line 1819 of file Array.h.

◆ ContainsSubset() [2/4]

template<class T , class A = StandardAllocator>
template<class C , class BP >
iterator pcl::Array< T, A >::ContainsSubset ( const C &  c,
BP  p 
) const
inlinenoexcept

#

Definition at line 1827 of file Array.h.

◆ ContainsSubset() [3/4]

template<class T , class A = StandardAllocator>
template<class FI >
iterator pcl::Array< T, A >::ContainsSubset ( FI  i,
FI  j 
) const
inlinenoexcept

#

Definition at line 1803 of file Array.h.

◆ ContainsSubset() [4/4]

template<class T , class A = StandardAllocator>
template<class FI , class BP >
iterator pcl::Array< T, A >::ContainsSubset ( FI  i,
FI  j,
BP  p 
) const
inlinenoexcept

#

Definition at line 1811 of file Array.h.

◆ Count() [1/2]

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

#

Definition at line 1442 of file Array.h.

◆ Count() [2/2]

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

#

Definition at line 1450 of file Array.h.

◆ CountIf()

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

#

Definition at line 1458 of file Array.h.

References pcl::CountIf().

◆ End() [1/2]

template<class T , class A = StandardAllocator>
iterator pcl::Array< T, A >::End ( )
inline

Returns a mutable iterator located at the end of this array.

Definition at line 451 of file Array.h.

Referenced by pcl::JPLEphemeris::ConstantValue(), pcl::FileFormatInstance::ImagePropertyDescription(), pcl::FileFormatInstance::PropertyDescription(), and pcl::Array< T, A >::Replace().

◆ end() [1/2]

template<class T , class A = StandardAllocator>
iterator pcl::Array< T, A >::end ( )
inline

STL-compatible iteration. Equivalent to End().

Definition at line 611 of file Array.h.

◆ End() [2/2]

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

Returns an immutable iterator located at the end of this array.

Definition at line 460 of file Array.h.

◆ end() [2/2]

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

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

Definition at line 619 of file Array.h.

◆ EnsureUnique()

template<class T , class A = StandardAllocator>
void pcl::Array< 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 242 of file Array.h.

Referenced by pcl::RedundantMultiscaleTransform::operator=(), and pcl::Array< T, A >::Replace().

◆ Expand()

template<class T , class A = StandardAllocator>
iterator pcl::Array< T, A >::Expand ( size_type  n = 1)
inline

Appends a contiguous sequence of n default-constructed objects to this array. This operation is equivalent to:

Grow( End(), n )
iterator Grow(iterator i, size_type n=1)
Definition: Array.h:816
iterator End()
Definition: Array.h:451

Returns an iterator pointing to the first newly created array element, or End() if n is zero.

Definition at line 836 of file Array.h.

◆ Fill()

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

Sets all objects contained by this array equal to v.

Definition at line 1362 of file Array.h.

Referenced by pcl::AES256::AES256().

◆ FirstThat() [1/2]

template<class T , class A = StandardAllocator>
template<class F >
iterator pcl::Array< T, A >::FirstThat ( f)
inline

Returns an iterator pointing to the first object x in this array such that f( const T& x ) is true. Returns End() if such object does not exist.

Definition at line 1423 of file Array.h.

◆ FirstThat() [2/2]

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

Returns an immutable iterator pointing to the first object x in this array such that f( const T& x ) is true. Returns End() if such object does not exist.

Definition at line 1412 of file Array.h.

◆ Grow()

template<class T , class A = StandardAllocator>
iterator pcl::Array< T, A >::Grow ( iterator  i,
size_type  n = 1 
)
inline

Inserts a contiguous sequence of n default-constructed objects at the specified location i in this array.

The insertion point i is constrained to stay in the range [Begin(),End()) of existing array elements.

Returns an iterator pointing to the first newly created array element, or i if n is zero.

Definition at line 816 of file Array.h.

References pcl::Range().

◆ Hash()

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

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

Definition at line 2020 of file Array.h.

References pcl::Hash64().

◆ Hash32()

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

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 2011 of file Array.h.

References pcl::Hash32().

◆ Hash64()

template<class T , class A = StandardAllocator>
uint64 pcl::Array< 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 1998 of file Array.h.

References pcl::Hash64().

◆ Import()

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

Causes this array to contain the sequence of objects defined by the range [i,j) of array iterators. The previously referenced data structure is dereferenced and destroyed/deallocated if it becomes unreferenced.

After calling this function, this array, or a subsequently created alias, will own and eventually destroy and deallocate the specified sequence of contiguous objects.

Definition at line 771 of file Array.h.

◆ Insert() [1/3]

template<class T , class A = StandardAllocator>
iterator pcl::Array< T, A >::Insert ( iterator  i,
const Array< T, A > &  x 
)
inline

Inserts a copy of the objects in a direct container x at the specified location i in this array.

The insertion point i is constrained to stay in the range [Begin(),End()) of existing array elements. The source array x can safely be a reference to this array.

Returns an iterator pointing to the first newly created array element, or i if x is empty.

Definition at line 882 of file Array.h.

◆ Insert() [2/3]

template<class T , class A = StandardAllocator>
iterator pcl::Array< T, A >::Insert ( iterator  i,
const T &  v,
size_type  n = 1 
)
inline

Inserts a contiguous sequence of n copies of the object v at the specified location i in this array.

The insertion point i is constrained to stay in the range [Begin(),End()) of existing array elements.

Returns an iterator pointing to the first inserted array element, or i if n is zero.

Definition at line 901 of file Array.h.

◆ Insert() [3/3]

template<class T , class A = StandardAllocator>
template<class FI >
iterator pcl::Array< T, A >::Insert ( iterator  i,
FI  p,
FI  q 
)
inline

Inserts a copy of the sequence of objects defined by the range [p,q) of forward iterators at the specified location i in this array.

The insertion point i is constrained to stay in the range [Begin(),End()) of existing array elements.

Returns an iterator pointing to the first inserted array element, or i if q <= p.

Note
p and q must not be iterators into this array.

Definition at line 925 of file Array.h.

References pcl::Range().

◆ IsAliasOf()

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

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

Two objects are aliases if both share the same data.

Definition at line 230 of file Array.h.

◆ IsEmpty()

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

Returns true iff this array is empty.

Definition at line 312 of file Array.h.

Referenced by pcl::QuadTree< T >::LeafNode::LeafNode(), and pcl::GenericChebyshevFit< Tx, Ty >::IsValid().

◆ IsUnique()

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

Returns true iff this array uniquely references its contained data.

Definition at line 220 of file Array.h.

◆ IsValid()

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

Returns true only if this array is valid. An array is valid if it references an internal array structure, even if it is an empty array.

In general, all Array objects are valid with only two exceptions:

  • Objects that have been move-copied or move-assigned to other arrays.
  • Objects that have been invalidated explicitly by calling Transfer().

An invalid array object cannot be used and should be destroyed immediately. Invalid arrays are always destroyed automatically during move construction and move assignment operations.

Definition at line 304 of file Array.h.

◆ LastThat()

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

Returns an iterator pointing to the last object x in this array such that f( const T& x ) is true. Returns End() if such object does not exist.

Definition at line 1435 of file Array.h.

◆ Length()

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

◆ LowerBound()

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

Returns the minimum legal index in this array (always zero). For empty arrays, this function returns a meaningless value.

Definition at line 321 of file Array.h.

◆ MaxItem() [1/4]

template<class T , class A = StandardAllocator>
iterator pcl::Array< T, A >::MaxItem ( )
inline

#

Definition at line 1504 of file Array.h.

References pcl::MaxItem().

◆ MaxItem() [2/4]

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

#

Definition at line 1497 of file Array.h.

References pcl::MaxItem().

◆ MaxItem() [3/4]

template<class T , class A = StandardAllocator>
template<class BP >
iterator pcl::Array< T, A >::MaxItem ( BP  p)
inline

#

Definition at line 1521 of file Array.h.

References pcl::MaxItem().

◆ MaxItem() [4/4]

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

#

Definition at line 1513 of file Array.h.

References pcl::MaxItem().

◆ MinItem() [1/4]

template<class T , class A = StandardAllocator>
iterator pcl::Array< T, A >::MinItem ( )
inline

#

Definition at line 1472 of file Array.h.

References pcl::MinItem().

◆ MinItem() [2/4]

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

#

Definition at line 1465 of file Array.h.

References pcl::MinItem().

◆ MinItem() [3/4]

template<class T , class A = StandardAllocator>
template<class BP >
iterator pcl::Array< T, A >::MinItem ( BP  p)
inline

#

Definition at line 1489 of file Array.h.

References pcl::MinItem().

◆ MinItem() [4/4]

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

#

Definition at line 1481 of file Array.h.

References pcl::MinItem().

◆ MutableIterator()

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

Returns a mutable iterator pointing to the same array element as the specified immutable iterator i.

Warning
As a side-effect of calling this function, the specified immutable iterator i may become invalid. This happens when this function is called for a shared array, since in this case getting a mutable iterator involves a deep copy of the array through an implicit call to EnsureUnique().

Definition at line 381 of file Array.h.

◆ operator*() [1/2]

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

Returns a reference to the first element of this array.

Definition at line 407 of file Array.h.

◆ operator*() [2/2]

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

Returns a reference to the unmodifiable first element of this array.

Definition at line 417 of file Array.h.

◆ operator=() [1/2]

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

Move assignment operator. Returns a reference to this object.

Definition at line 656 of file Array.h.

◆ operator=() [2/2]

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

Copy assignment operator.

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

Definition at line 631 of file Array.h.

◆ operator[]() [1/2]

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

Returns a reference to the element at the specified index i. No bounds checking is performed.

Definition at line 390 of file Array.h.

◆ operator[]() [2/2]

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

Returns a reference to the unmodifiable element at the specified index i in this array. No bounds checking is performed.

Definition at line 399 of file Array.h.

◆ Prepend() [1/3]

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

Inserts a copy of the objects stored in the array x at the beginning of this array.

Definition at line 970 of file Array.h.

◆ Prepend() [2/3]

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

Inserts a contiguous sequence of n copies of the object v at the beginning of this array.

Definition at line 979 of file Array.h.

◆ Prepend() [3/3]

template<class T , class A = StandardAllocator>
template<class FI >
void pcl::Array< T, A >::Prepend ( FI  p,
FI  q 
)
inline

Inserts a copy of the sequence of objects defined by the range [p,q) of forward iterators at the beginning of this array.

Note
p and q must not be iterators into this array.

Definition at line 991 of file Array.h.

◆ Release()

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

Releases the data contained by this array.

This member function returns a pointer to the internal data block referenced by this object, after ensuring that it is uniquely referenced. If the array is empty, this function may return the null pointer.

Before returning, this member function empties this array without deallocating its contained data. The caller is then responsible for destructing and/or deallocating the returned block when it is no longer required.

Definition at line 798 of file Array.h.

◆ Remove() [1/4]

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

Destroys and removes all existing objects equal to the specified value v in this array.

Definition at line 1109 of file Array.h.

◆ Remove() [2/4]

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

Destroys and removes every object x in this array such that the binary predicate p( x, v ) is true.

Definition at line 1138 of file Array.h.

◆ Remove() [3/4]

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

Destroys and removes a sequence of contiguous objects in the range [i,j) of this array.

If the starting iterator i is located at or after the end of this array, or if j precedes i, this function does nothing. Otherwise the range [i,j) is constrained to stay in the range [Begin(),End()) of existing array elements.

Definition at line 1044 of file Array.h.

References pcl::Max().

◆ Remove() [4/4]

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

Destroys and removes a sequence of n contiguous objects starting at the specified location i in this array.

If the starting iterator i is located at or after the end of this array, or if n is zero, this function does nothing. Otherwise i is constrained to stay in the range [Begin(),End()) of existing array elements.

Definition at line 1030 of file Array.h.

◆ RemoveFirst()

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

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

Remove( Begin(), At( n ) );
iterator Begin()
Definition: Array.h:426
iterator At(size_type i)
Definition: Array.h:355
void Remove(iterator i, size_type n=1)
Definition: Array.h:1030

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 1071 of file Array.h.

◆ RemoveLast()

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

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

Truncate( End() - n );
void Truncate(iterator i)
Definition: Array.h:1100

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 1085 of file Array.h.

◆ Replace() [1/3]

template<class T , class A = StandardAllocator>
iterator pcl::Array< T, A >::Replace ( iterator  i,
iterator  j,
const Array< T, A > &  x 
)
inline

Replaces a sequence of contiguous objects defined by the range [i,j) of iterators in this array by the objects stored in an array x.

If the starting iterator i is located at or after the end of this array, or if j precedes i, this function does nothing. Otherwise the range [i,j) is constrained to stay in the range [Begin(),End()) of existing array elements.

Returns an iterator pointing to the first replaced array element, i if no elements are replaced, or nullptr if the resulting array is empty.

Definition at line 1199 of file Array.h.

References pcl::Array< T, A >::Begin(), pcl::Array< T, A >::ConstBegin(), pcl::Array< T, A >::ConstEnd(), pcl::Array< T, A >::End(), and pcl::Array< T, A >::EnsureUnique().

◆ Replace() [2/3]

template<class T , class A = StandardAllocator>
iterator pcl::Array< T, A >::Replace ( iterator  i,
iterator  j,
const T &  v,
size_type  n = 1 
)
inline

Replaces a sequence of contiguous objects defined by the range [i,j) of iterators in this array by n copies of the specified object v.

If the starting iterator i is located at or after the end of this array, or if j precedes i, this function does nothing. Otherwise the range [i,j) is constrained to stay in the range [Begin(),End()) of existing array elements.

Returns an iterator pointing to the first replaced array element, i if no elements are replaced, or nullptr if the resulting array is empty.

Definition at line 1221 of file Array.h.

◆ Replace() [3/3]

template<class T , class A = StandardAllocator>
template<class FI >
iterator pcl::Array< T, A >::Replace ( iterator  i,
iterator  j,
FI  p,
FI  q 
)
inline

Replaces a sequence of contiguous objects defined by the range [i,j) of iterators in this array by the sequence of objects in the range [p,q) of forward iterators.

If the starting iterator i is located at or after the end of this array, or if j precedes i, this function does nothing. Otherwise the range [i,j) is constrained to stay in the range [Begin(),End()) of existing array elements.

Returns an iterator pointing to the first replaced array element, i if no elements are replaced, or nullptr if the resulting array is empty.

Note
p and q must not be iterators into this array.

Definition at line 1264 of file Array.h.

References pcl::Range().

◆ Reserve()

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

Ensures that this array has enough capacity to store n objects.

After calling this member function with n > 0, this object is guaranteed to uniquely reference its array data.

Definition at line 1295 of file Array.h.

◆ Resize()

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

Resizes this array to the specified length n, either by appending new default-constructed objects, or by removing existing trailing objects. This operation is equivalent to:

if ( n > Length() )
Expand( n - Length() );
else
Shrink( Length() - n );
void Shrink(size_type n=1)
Definition: Array.h:845
iterator Expand(size_type n=1)
Definition: Array.h:836
size_type Length() const noexcept
Definition: Array.h:266

Definition at line 862 of file Array.h.

◆ Reverse()

template<class T , class A = StandardAllocator>
void pcl::Array< T, A >::Reverse ( )
inline

#

Definition at line 1529 of file Array.h.

◆ ReverseBegin() [1/2]

template<class T , class A = StandardAllocator>
reverse_iterator pcl::Array< T, A >::ReverseBegin ( )
inline

Returns a mutable reverse iterator located at the reverse beginning of this array.

The reverse beginning corresponds to the last element in the array.

Definition at line 479 of file Array.h.

◆ ReverseBegin() [2/2]

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

Returns an immutable reverse iterator located at the reverse beginning of this array.

The reverse beginning corresponds to the last element in the array.

Definition at line 492 of file Array.h.

◆ ReverseEnd() [1/2]

template<class T , class A = StandardAllocator>
reverse_iterator pcl::Array< T, A >::ReverseEnd ( )
inline

Returns a mutable reverse iterator located at the reverse end of this array.

The reverse end corresponds to an (nonexistent) element immediately before the first element in the array.

Definition at line 517 of file Array.h.

◆ ReverseEnd() [2/2]

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

Returns an immutable reverse iterator located at the reverse end of this array.

The reverse end corresponds to an (nonexistent) element immediately before the first element in the array.

Definition at line 531 of file Array.h.

◆ Rotate()

template<class T , class A = StandardAllocator>
void pcl::Array< T, A >::Rotate ( distance_type  n)
inline

#

Definition at line 1537 of file Array.h.

References pcl::Rotate().

◆ Search() [1/4]

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

#

Definition at line 1585 of file Array.h.

◆ Search() [2/4]

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

◆ Search() [3/4]

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

#

Definition at line 1602 of file Array.h.

◆ Search() [4/4]

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

#

Definition at line 1594 of file Array.h.

◆ SearchLast() [1/4]

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

#

Definition at line 1617 of file Array.h.

◆ SearchLast() [2/4]

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

#

Definition at line 1610 of file Array.h.

◆ SearchLast() [3/4]

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

#

Definition at line 1634 of file Array.h.

◆ SearchLast() [4/4]

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

#

Definition at line 1626 of file Array.h.

◆ SearchLastSubset() [1/8]

template<class T , class A = StandardAllocator>
template<class BI >
iterator pcl::Array< T, A >::SearchLastSubset ( BI  i,
BI  j 
)
inline

#

Definition at line 1723 of file Array.h.

References pcl::SearchLast().

◆ SearchLastSubset() [2/8]

template<class T , class A = StandardAllocator>
template<class BI >
const_iterator pcl::Array< T, A >::SearchLastSubset ( BI  i,
BI  j 
) const
inlinenoexcept

#

Definition at line 1715 of file Array.h.

References pcl::SearchLast().

◆ SearchLastSubset() [3/8]

template<class T , class A = StandardAllocator>
template<class BI , class BP >
iterator pcl::Array< T, A >::SearchLastSubset ( BI  i,
BI  j,
BP  p 
)
inline

#

Definition at line 1740 of file Array.h.

References pcl::SearchLast().

◆ SearchLastSubset() [4/8]

template<class T , class A = StandardAllocator>
template<class BI , class BP >
const_iterator pcl::Array< T, A >::SearchLastSubset ( BI  i,
BI  j,
BP  p 
) const
inlinenoexcept

#

Definition at line 1732 of file Array.h.

References pcl::SearchLast().

◆ SearchLastSubset() [5/8]

template<class T , class A = StandardAllocator>
template<class C >
iterator pcl::Array< T, A >::SearchLastSubset ( const C &  x)
inline

#

Definition at line 1758 of file Array.h.

◆ SearchLastSubset() [6/8]

template<class T , class A = StandardAllocator>
template<class C >
const_iterator pcl::Array< T, A >::SearchLastSubset ( const C &  x) const
inlinenoexcept

#

Definition at line 1749 of file Array.h.

◆ SearchLastSubset() [7/8]

template<class T , class A = StandardAllocator>
template<class C , class BP >
iterator pcl::Array< T, A >::SearchLastSubset ( const C &  x,
BP  p 
)
inline

#

Definition at line 1777 of file Array.h.

◆ SearchLastSubset() [8/8]

template<class T , class A = StandardAllocator>
template<class C , class BP >
const_iterator pcl::Array< T, A >::SearchLastSubset ( const C &  x,
BP  p 
) const
inlinenoexcept

#

Definition at line 1768 of file Array.h.

◆ SearchSubset() [1/8]

template<class T , class A = StandardAllocator>
template<class C >
iterator pcl::Array< T, A >::SearchSubset ( const C &  x)
inline

#

Definition at line 1686 of file Array.h.

◆ SearchSubset() [2/8]

template<class T , class A = StandardAllocator>
template<class C >
const_iterator pcl::Array< T, A >::SearchSubset ( const C &  x) const
inlinenoexcept

#

Definition at line 1677 of file Array.h.

◆ SearchSubset() [3/8]

template<class T , class A = StandardAllocator>
template<class C , class BP >
iterator pcl::Array< T, A >::SearchSubset ( const C &  x,
BP  p 
)
inline

#

Definition at line 1705 of file Array.h.

◆ SearchSubset() [4/8]

template<class T , class A = StandardAllocator>
template<class C , class BP >
const_iterator pcl::Array< T, A >::SearchSubset ( const C &  x,
BP  p 
) const
inlinenoexcept

#

Definition at line 1696 of file Array.h.

◆ SearchSubset() [5/8]

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

#

Definition at line 1651 of file Array.h.

References pcl::Search().

◆ SearchSubset() [6/8]

template<class T , class A = StandardAllocator>
template<class FI >
const_iterator pcl::Array< T, A >::SearchSubset ( FI  i,
FI  j 
) const
inlinenoexcept

#

Definition at line 1643 of file Array.h.

References pcl::Search().

◆ SearchSubset() [7/8]

template<class T , class A = StandardAllocator>
template<class FI , class BP >
iterator pcl::Array< T, A >::SearchSubset ( FI  i,
FI  j,
BP  p 
)
inline

#

Definition at line 1668 of file Array.h.

References pcl::Search().

◆ SearchSubset() [8/8]

template<class T , class A = StandardAllocator>
template<class FI , class BP >
const_iterator pcl::Array< T, A >::SearchSubset ( FI  i,
FI  j,
BP  p 
) const
inlinenoexcept

#

Definition at line 1660 of file Array.h.

References pcl::Search().

◆ SecureFill()

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

Securely fills this array and all instances sharing its data with the specified value v.

The normal data sharing mechanism is ignored on purpose by this member function, so if there are other objects sharing the same array data, all of them will be affected unconditionally.

This function is useful to ensure that sensitive data, such as user passwords and user names, are destroyed without the risk of surviving duplicates as a result of implicit data sharing.

Definition at line 1380 of file Array.h.

◆ SetAllocator()

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

Sets a new allocator object for this array.

Definition at line 346 of file Array.h.

◆ ShiftLeft()

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

#

Definition at line 1550 of file Array.h.

◆ ShiftRight()

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

#

Definition at line 1564 of file Array.h.

◆ Shrink()

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

Removes a contiguous trailing sequence of n existing objects from this array. This function is a synonym for RemoveLast().

Definition at line 845 of file Array.h.

◆ Size()

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

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

Definition at line 258 of file Array.h.

◆ Sort() [1/2]

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

#

Definition at line 1834 of file Array.h.

References pcl::QuickSort().

◆ Sort() [2/2]

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

#

Definition at line 1843 of file Array.h.

References pcl::QuickSort().

◆ Squeeze()

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

Causes this array to allocate the exact required memory space to store its contained objects.

If the array has excess capacity, a new copy of its contained objects is generated and stored in a newly allocated memory block that fits them exactly, then the previous memory block is deallocated.

If the array is empty, calling this function is equivalent to Clear(). Note that in this case a previously allocated memory block (by a call to Reserve()) may also be deallocated.

Definition at line 1333 of file Array.h.

◆ ToCommaSeparated()

template<class T , class A = StandardAllocator>
template<class S >
S& pcl::Array< 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, ',' );
S & ToSeparated(S &s, SP separator) const
Definition: Array.h:1874

Definition at line 1943 of file Array.h.

◆ ToNewLineSeparated()

template<class T , class A = StandardAllocator>
template<class S >
S& pcl::Array< 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 1985 of file Array.h.

◆ ToSeparated() [1/2]

template<class T , class A = StandardAllocator>
template<class S , typename SP >
S& pcl::Array< 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 1874 of file Array.h.

◆ ToSeparated() [2/2]

template<class T , class A = StandardAllocator>
template<class S , typename SP , class AF >
S& pcl::Array< 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 1914 of file Array.h.

◆ ToSpaceSeparated()

template<class T , class A = StandardAllocator>
template<class S >
S& pcl::Array< 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 1957 of file Array.h.

◆ ToTabSeparated()

template<class T , class A = StandardAllocator>
template<class S >
S& pcl::Array< 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 1971 of file Array.h.

◆ Transfer() [1/2]

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

Transfers data from another array x to this object.

Decrements the reference counter of the current array data, and destroys it if it becomes unreferenced.

Transfers source array data to this object, leaving empty and invalid the source object x.

Definition at line 687 of file Array.h.

◆ Transfer() [2/2]

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

Transfers data from another array x to this object.

Decrements the reference counter of the current array data, and destroys it if it becomes unreferenced.

Transfers source array data to this object, leaving empty and invalid the source object x.

Definition at line 671 of file Array.h.

◆ Truncate()

template<class T , class A = StandardAllocator>
void pcl::Array< T, A >::Truncate ( 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 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 1100 of file Array.h.

◆ UniquifyIterator()

template<class T , class A = StandardAllocator>
void pcl::Array< 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 558 of file Array.h.

◆ UniquifyIterators()

template<class T , class A = StandardAllocator>
void pcl::Array< 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 578 of file Array.h.

◆ UpperBound()

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

Returns the maximum legal index in this array. It is equal to Length()-1. For empty arrays, this function returns a meaningless value.

Definition at line 330 of file Array.h.

Friends And Related Function Documentation

◆ Swap

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

Exchanges two dynamic arrays x1 and x2.

Definition at line 1852 of file Array.h.


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