C++ API Reference for Intel® Data Analytics Acceleration Library 2018 Update 2

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() [1/4]

Collection ( )
inline

Default constructor. Sets the size and capacity to 0.

◆ Collection() [2/4]

Collection ( size_t  n)
inlineexplicit

Constructor. Creates a collection with n empty elements

Parameters
[in]nNumber of elements

◆ Collection() [3/4]

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() [4/4]

Collection ( const Collection< T > &  other)
inline

Copy constructor

Parameters
[in]otherCopied collection

◆ ~Collection()

virtual ~Collection ( )
inlinevirtual

Destructor

Member Function Documentation

◆ capacity()

size_t capacity ( ) const
inline

Size of an allocated storage

Returns
Size of the allocated storage

◆ clear()

void clear ( )
inline

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

◆ erase()

void erase ( size_t  pos)
inline

Erase an element from a position

Parameters
[in]posPosition to erase

◆ get() [1/2]

T& get ( size_t  index)
inline

Element access

Parameters
[in]indexIndex of an accessed element
Returns
Reference to the element

◆ get() [2/2]

const T& get ( size_t  index) const
inline

Const element access

Parameters
[in]indexIndex of an accessed element
Returns
Reference to the element

◆ insert() [1/2]

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

◆ insert() [2/2]

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

◆ operator<<()

Collection& operator<< ( const T &  x)
inline

Adds an element to the end of a collection

Parameters
[in]xElement to add

◆ operator[]() [1/2]

T& operator[] ( size_t  index)
inline

Element access

Parameters
[in]indexIndex of an accessed element
Returns
Reference to the element

◆ operator[]() [2/2]

const T& operator[] ( size_t  index) const
inline

Const element access

Parameters
[in]indexIndex of an accessed element
Returns
Reference to the element

◆ push_back()

Collection& push_back ( const T &  x)
inline

Adds an element to the end of a collection

Parameters
[in]xElement to add

◆ resize()

bool resize ( size_t  newCapacity)
inline

Changes the size of a storage

Parameters
[in]newCapacitySize of a new storage.

◆ size()

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.