Class that implements functionality of the Collection container.
More...
template<class T>
class daal::services::interface1::Collection< T >
- Template Parameters
-
T | Type of an object stored in the container |
◆ Collection() [1/4]
Default constructor. Sets the size and capacity to 0.
◆ Collection() [2/4]
Constructor. Creates a collection with n empty elements
- Parameters
-
◆ Collection() [3/4]
Constructor. Creates a collection from the array
- Parameters
-
[in] | n | Number of elements |
[in] | array | Array with elements |
◆ Collection() [4/4]
Copy constructor
- Parameters
-
[in] | other | Copied collection |
◆ ~Collection()
◆ capacity()
size_t capacity |
( |
| ) |
const |
|
inline |
Size of an allocated storage
- Returns
- Size of the allocated storage
◆ clear()
Clears a collection: removes an array, sets the size and capacity to 0
◆ erase()
Erase an element from a position
- Parameters
-
◆ get() [1/2]
Element access
- Parameters
-
[in] | index | Index 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] | index | Index 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] | pos | Position to set |
[in] | x | Element 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
-
◆ operator<<()
Adds an element to the end of a collection
- Parameters
-
◆ operator[]() [1/2]
T& operator[] |
( |
size_t |
index | ) |
|
|
inline |
Element access
- Parameters
-
[in] | index | Index 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] | index | Index of an accessed element |
- Returns
- Reference to the element
◆ push_back()
Adds an element to the end of a collection
- Parameters
-
◆ resize()
bool resize |
( |
size_t |
newCapacity | ) |
|
|
inline |
Changes the size of a storage
- Parameters
-
[in] | newCapacity | Size of a new storage. |
◆ size()
Size of a collection
- Returns
- Size of the collection
The documentation for this class was generated from the following file: