Class v_array taken directly from JL's implementation.
Class v_array is a templated class used to store variable length arrays. Memory locations are stored as 'extents', i.e., address of the first memory location and address after the last member.
`begin', `end' and `end_array' handle the extent of the array. `end_array' is the address at the end of the space allocated for the array while `end' is the address at the end of the space actually filled with elements.
The class should be instantiated on the basis of the data type of the contained array, eg. v_array<float32_t> if one wants to store a float32_t* array.
在文件 JLCoverTreePoint.h 第 24 行定义.
Public 成员函数 | |
T | last () |
void | decr () |
v_array () | |
T & | operator[] (unsigned int i) |
v_array () | |
~v_array () | |
T & | operator[] (unsigned int i) |
T | last () |
T | pop () |
bool | empty () |
void | decr () |
unsigned int | index () |
void | erase () |
void | push (const T &new_elem) |
void | push_many (const T *new_elem, size_t num) |
void | reserve (size_t length) |
void | calloc_reserve (size_t length) |
v_array< T > | pop (v_array< v_array< T > > &stack) |
Public 属性 | |
int | index |
int | length |
T * | elements |
T * | begin |
Pointer to first element of the array. 更多... | |
T * | end |
Pointer to last set element in the array. 更多... | |
T * | end_array |
Pointer to end of array, based on memory reserved. 更多... | |
v_array | ( | ) |
Create an empty v_array
在文件 JLCoverTreePoint.h 第 35 行定义.
void calloc_reserve | ( | size_t | length | ) |
void decr | ( | ) |
Decrement the pointer to the last element
在文件 JLCoverTreePoint.h 第 32 行定义.
unsigned int index | ( | ) |
T last | ( | ) |
Getter for the the last element of the v_array
在文件 JLCoverTreePoint.h 第 29 行定义.
T& operator[] | ( | unsigned int | i | ) |
Element access operator
i | of the element to be read |
在文件 JLCoverTreePoint.h 第 40 行定义.
T& operator[] | ( | unsigned int | i | ) |
void push | ( | const T & | new_elem | ) |
void push_many | ( | const T * | new_elem, |
size_t | num | ||
) |
void reserve | ( | size_t | length | ) |
T* elements |
Pointer to the beginning of the v_array elements
在文件 JLCoverTreePoint.h 第 50 行定义.
int index |
Pointer to the last element of the v_array
在文件 JLCoverTreePoint.h 第 44 行定义.
int length |
Length of the v_array
在文件 JLCoverTreePoint.h 第 47 行定义.