|
SHOGUN
4.2.0
|
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.
Definition at line 24 of file JLCoverTreePoint.h.
Public Member Functions | |
| 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 Attributes | |
| int | index |
| int | length |
| T * | elements |
| T * | begin |
| Pointer to first element of the array. More... | |
| T * | end |
| Pointer to last set element in the array. More... | |
| T * | end_array |
| Pointer to end of array, based on memory reserved. More... | |
| v_array | ( | ) |
Create an empty v_array
Definition at line 35 of file JLCoverTreePoint.h.
| v_array | ( | ) |
| ~v_array | ( | ) |
| void calloc_reserve | ( | size_t | length | ) |
| void decr | ( | ) |
Decrement the pointer to the last element
Definition at line 32 of file JLCoverTreePoint.h.
| bool empty | ( | ) |
| unsigned int index | ( | ) |
| T last | ( | ) |
Getter for the the last element of the v_array
Definition at line 29 of file JLCoverTreePoint.h.
| T last | ( | ) |
| T& operator[] | ( | unsigned int | i | ) |
Element access operator
| i | of the element to be read |
Definition at line 40 of file JLCoverTreePoint.h.
| 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
Definition at line 50 of file JLCoverTreePoint.h.
| T* end_array |
| int index |
Pointer to the last element of the v_array
Definition at line 44 of file JLCoverTreePoint.h.
| int length |
Length of the v_array
Definition at line 47 of file JLCoverTreePoint.h.