Array with arbitrary number of elements. More...
#include <gecode/support/dynamic-array.hpp>
Public Member Functions | |
| DynamicArray (A &a0, int n=32) | |
| Initialize with size n. | |
| DynamicArray (A &a0, unsigned int n) | |
| Initialize with size n. | |
| DynamicArray (const DynamicArray< T, A > &da) | |
| Copy elements from array da. | |
| ~DynamicArray (void) | |
| Release memory. | |
| const DynamicArray< T, A > & | operator= (const DynamicArray< T, A > &da) |
| Assign array (copy elements from a). | |
| T & | operator[] (int i) |
| Return element at position i (possibly resize). | |
| T & | operator[] (unsigned int i) |
| Return element at position i (possibly resize). | |
| const T & | operator[] (int i) const |
| Return element at position i. | |
| const T & | operator[] (unsigned int i) const |
| Return element at position i. | |
| operator T* (void) | |
| Cast in to pointer of type T. | |
Detailed Description
class Gecode::Support::DynamicArray< T, A >
Array with arbitrary number of elements.
Definition at line 44 of file dynamic-array.hpp.
Constructor & Destructor Documentation
◆ DynamicArray() [1/3]
|
inline |
Initialize with size n.
Definition at line 83 of file dynamic-array.hpp.
◆ DynamicArray() [2/3]
|
inline |
Initialize with size n.
Definition at line 88 of file dynamic-array.hpp.
◆ DynamicArray() [3/3]
|
inline |
Copy elements from array da.
Definition at line 93 of file dynamic-array.hpp.
◆ ~DynamicArray()
|
inline |
Release memory.
Definition at line 100 of file dynamic-array.hpp.
Member Function Documentation
◆ operator=()
|
inline |
Assign array (copy elements from a).
Definition at line 106 of file dynamic-array.hpp.
◆ operator[]() [1/4]
|
inline |
Return element at position i (possibly resize).
Definition at line 126 of file dynamic-array.hpp.
◆ operator[]() [2/4]
|
inline |
Return element at position i (possibly resize).
Definition at line 134 of file dynamic-array.hpp.
◆ operator[]() [3/4]
|
inline |
Return element at position i.
Definition at line 140 of file dynamic-array.hpp.
◆ operator[]() [4/4]
|
inline |
Return element at position i.
Definition at line 147 of file dynamic-array.hpp.
◆ operator T*()
|
inline |
Cast in to pointer of type T.
Definition at line 153 of file dynamic-array.hpp.
The documentation for this class was generated from the following file:
- gecode/support/dynamic-array.hpp
