openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
|
A vector storing arbitrary data. More...
#include <SF_vector.h>
Public Member Functions | |
vector () | |
Initialize an empty vector. More... | |
vector (size_t n) | |
Initialize a vector of size n. More... | |
vector (size_t n, const T val) | |
Initialize a vector of size n and of constant value val. More... | |
vector (const vector< T > &vec) | |
Initialize a vector from another vector. More... | |
virtual | ~vector () |
const T & | operator[] (size_t i) const |
Vector access. More... | |
T & | operator[] (size_t i) |
Vector access. More... | |
void | operator= (const vector< T > &vec) |
Deep copy of a vector. More... | |
T * | data () |
Pointer to the vector's start. More... | |
const T * | data () const |
Pointer to the vector's start. More... | |
size_t | size () const |
The current size of the vector. More... | |
size_t | capacity () const |
The maximum amount of entries the vector can hold without reallocating. More... | |
const T * | begin () const |
Pointer to the vector's start. More... | |
T * | begin () |
Pointer to the vector's start. More... | |
const T * | end () const |
Pointer to the vector's end. More... | |
T * | end () |
Pointer to the vector's end. More... | |
T & | front () |
T & | back () |
const T & | front () const |
const T & | back () const |
template<class InputIterator > | |
void | assign (InputIterator s, InputIterator e) |
Assign a memory range. More... | |
void | assign (size_t n, T val=T()) |
Assign n many elements of value val. More... | |
void | assign (size_t n, T *array, bool del) |
Make a vector point to an existing array. More... | |
void | resize (size_t n) |
Resize a vector. More... | |
void | resize (size_t n, const T val) |
Resize a vector setting the newly allocated elements to val. More... | |
void | reserve (size_t n) |
void | zero () |
void | reallocate () |
template<class InputIterator > | |
void | append (InputIterator s, InputIterator e) |
Append data to the current data chunk. More... | |
T & | push_back (T val) |
A vector storing arbitrary data.
The design and API are similar to std::vector.
Definition at line 42 of file SF_vector.h.
|
inline |
Initialize an empty vector.
Definition at line 46 of file SF_vector.h.
|
inline |
Initialize a vector of size n.
Definition at line 50 of file SF_vector.h.
|
inline |
Initialize a vector of size n and of constant value val.
Definition at line 56 of file SF_vector.h.
|
inline |
Initialize a vector from another vector.
Definition at line 62 of file SF_vector.h.
|
inlinevirtual |
Definition at line 67 of file SF_vector.h.
|
inline |
Append data to the current data chunk.
Definition at line 268 of file SF_vector.h.
|
inline |
Assign a memory range.
Definition at line 161 of file SF_vector.h.
|
inline |
Assign n many elements of value val.
Definition at line 184 of file SF_vector.h.
|
inline |
Make a vector point to an existing array.
Only recommended for experts.
Definition at line 201 of file SF_vector.h.
|
inline |
|
inline |
Definition at line 154 of file SF_vector.h.
|
inline |
Pointer to the vector's start.
Definition at line 116 of file SF_vector.h.
|
inline |
Pointer to the vector's start.
Definition at line 122 of file SF_vector.h.
|
inline |
The maximum amount of entries the vector can hold without reallocating.
Definition at line 110 of file SF_vector.h.
|
inline |
Pointer to the vector's start.
Definition at line 91 of file SF_vector.h.
|
inline |
Pointer to the vector's start.
Definition at line 97 of file SF_vector.h.
|
inline |
Pointer to the vector's end.
Definition at line 128 of file SF_vector.h.
|
inline |
Pointer to the vector's end.
Definition at line 134 of file SF_vector.h.
|
inline |
Definition at line 139 of file SF_vector.h.
|
inline |
Definition at line 149 of file SF_vector.h.
|
inline |
Deep copy of a vector.
Definition at line 85 of file SF_vector.h.
|
inline |
Vector access.
Definition at line 73 of file SF_vector.h.
|
inline |
Vector access.
Definition at line 79 of file SF_vector.h.
|
inline |
|
inline |
Allocate new data chunk for the current size. This is useful if the vector has been resized to a considerably smaller size.
Definition at line 257 of file SF_vector.h.
|
inline |
|
inline |
Resize a vector.
Definition at line 209 of file SF_vector.h.
|
inline |
Resize a vector setting the newly allocated elements to val.
Definition at line 228 of file SF_vector.h.
|
inline |
The current size of the vector.
Definition at line 104 of file SF_vector.h.
|
inline |