C++ API Reference for Intel® Data Analytics Acceleration Library 2020 Update 1

List of all members
Collection< T > Class Template Reference

Class that implements functionality of the Collection container. More...

Class Declaration

template<class T>
class daal::services::interface1::Collection< T >

Template Parameters
TType of an object stored in the container

Constructor & Destructor Documentation

Collection ( )
inline

Default constructor. Sets the size and capacity to 0.

Collection ( size_t  n)
inlineexplicit

Constructor. Creates a collection with n empty elements

Parameters
[in]nNumber of elements
Collection ( size_t  n,
const T *  array 
)
inline

Constructor. Creates a collection from the array

Parameters
[in]nNumber of elements
[in]arrayArray with elements
Collection ( const Collection< T > &  other)
inline

Copy constructor

Parameters
[in]otherCopied collection
virtual ~Collection ( )
inlinevirtual

Destructor

Member Function Documentation

size_t capacity ( ) const
inline

Size of an allocated storage

Returns
Size of the allocated storage
void clear ( )
inline

Clears a collection: removes an array, sets the size and capacity to 0

T* data ( )
inline

Returns pointer to the underlying array serving as element storage

Returns
Pointer to the array
const T* data ( ) const
inline

Returns const pointer to the underlying array serving as element storage

Returns
Const pointer to the array
void erase ( size_t  pos)
inline

Erase an element from a position

Parameters
[in]posPosition to erase
T& get ( size_t  index)
inline

Element access

Parameters
[in]indexIndex of an accessed element
Returns
Reference to the element
const T& get ( size_t  index) const
inline

Const element access

Parameters
[in]indexIndex of an accessed element
Returns
Reference to the element
bool insert ( const size_t  pos,
const T &  x 
)
inline

Insert an element into a position

Parameters
[in]posPosition to set
[in]xElement to set
bool insert ( const size_t  pos,
Collection< T > &  other 
)
inline

Insert a collection to another collection into a position

Parameters
[in]posPosition to see
[in]otherCollection to set
Collection& operator<< ( const T &  x)
inline

Adds an element to the end of a collection

Parameters
[in]xElement to add
T& operator[] ( size_t  index)
inline

Element access

Parameters
[in]indexIndex of an accessed element
Returns
Reference to the element
const T& operator[] ( size_t  index) const
inline

Const element access

Parameters
[in]indexIndex of an accessed element
Returns
Reference to the element
Collection& push_back ( const T &  x)
inline

Adds an element to the end of a collection

Parameters
[in]xElement to add
bool resize ( size_t  newCapacity)
inline

Changes the size of a storage

Parameters
[in]newCapacitySize of a new storage.
bool safe_push_back ( const T &  x)
inline

Adds an element to the end of a collection

Parameters
[in]xThe element to add
Returns
True if the element was successfully added
size_t size ( ) const
inline

Size of a collection

Returns
Size of the collection

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

For more complete information about compiler optimizations, see our Optimization Notice.