Geogram
Version 1.9.1-rc
A programming library of geometric algorithms
|
Small_set is similar to std::set, but with fixed maximum size (and no dynamic memory allocation). More...
#include <geogram/voronoi/generic_RVD_vertex.h>
Public Types | |
typedef T * | iterator |
A random access iterator to elements | |
typedef const T * | const_iterator |
A random access iterator to const elements. | |
typedef T & | reference |
Reference to element. | |
typedef T | value_type |
Type of the elements. | |
Public Member Functions | |
small_set () | |
Constructs an empty small_set. | |
index_t | size () const |
Gets the number of element in this small_set. | |
index_t | capacity () const |
Gets the maximum number of elements that can be stored in this small_set. | |
iterator | begin () |
Gets an iterator to the first element. | |
iterator | end () |
Gets an iterator one position past the last element. | |
iterator | end_of_storage () |
Gets an iterator one position past the last element that can be stored. | |
const_iterator | begin () const |
Gets a const iterator to the first element.. | |
const_iterator | end () const |
Gets a const iterator one position past the last element. | |
const_iterator | end_of_storage () const |
Gets a const iterator one position past the last element that can be stored. | |
iterator | insert (const T &x) |
Insert a new element. More... | |
iterator | insert (const T &x, iterator where) |
Inserts a new element at a specified location.. More... | |
void | clear () |
Clears this small_set. | |
iterator | find (const T &x) |
Finds an element by value. More... | |
const_iterator | find (const T &x) const |
Finds an element by value. More... | |
void | push_back (const T &x) |
Appends an element to the end of the list. More... | |
void | print (std::ostream &out) const |
Displays the stored elements. | |
T & | operator[] (signed_index_t i) |
Direct access to an element. More... | |
const T & | operator[] (signed_index_t i) const |
Direct access to an element. More... | |
Protected Member Functions | |
void | grow () |
Increases the size of this small_set. More... | |
iterator | find_i (const T &x) |
Finds where an element is or where it should be inserted from its value. More... | |
const_iterator | find_i (const T &x) const |
Finds where an element should be located from its value. More... | |
Protected Attributes | |
T | data_ [DIM] |
index_t | size_ |
Small_set is similar to std::set, but with fixed maximum size (and no dynamic memory allocation).
Used by GenericVoronoiDiagram to store vertices equations (represented as plane indices triplets).
Definition at line 79 of file generic_RVD_vertex.h.
|
inline |
Finds an element by value.
[in] | x | a const reference to the value of the element |
Definition at line 220 of file generic_RVD_vertex.h.
|
inline |
Finds an element by value.
[in] | x | a const reference to the value of the element |
Definition at line 233 of file generic_RVD_vertex.h.
|
inlineprotected |
Finds where an element is or where it should be inserted from its value.
[in] | x | a const reference to the value of the element |
Definition at line 309 of file generic_RVD_vertex.h.
|
inlineprotected |
Finds where an element should be located from its value.
[in] | x | a const reference to the value of the element |
Definition at line 323 of file generic_RVD_vertex.h.
|
inlineprotected |
Increases the size of this small_set.
Cannot grow past the maximum size.
Definition at line 294 of file generic_RVD_vertex.h.
|
inline |
Insert a new element.
[in] | x | a const reference to the element to be inserted |
Definition at line 169 of file generic_RVD_vertex.h.
|
inline |
Inserts a new element at a specified location..
[in] | x | a const reference to the element to be inserted |
[in] | where | an iterator to the location where x should be inserted |
=
where) Definition at line 181 of file generic_RVD_vertex.h.
|
inline |
Direct access to an element.
[in] | i | index of the element |
Definition at line 272 of file generic_RVD_vertex.h.
|
inline |
Direct access to an element.
[in] | i | index of the element |
Definition at line 283 of file generic_RVD_vertex.h.
|
inline |
Appends an element to the end of the list.
[in] | x | a const reference to the value of the element |
x
is greater than all the stored elements Definition at line 246 of file generic_RVD_vertex.h.