23#ifndef VCL_SPACE_CORE_VECTOR_POINTER_VECTOR_H
24#define VCL_SPACE_CORE_VECTOR_POINTER_VECTOR_H
28#include <vclib/concepts/pointers.h>
29#include <vclib/misc/iterators/const_pointer_iterator.h>
74template<IsAnyPointer T,
int N = -1>
120 using Base::operator[];
121 using Base::operator();
The ConstPointerIterator class is a utility class that wraps an iterator of a container of [shared] p...
Definition const_pointer_iterator.h:57
The PointerVector class is a utility container that stores a sequence of pointers that preserve their...
Definition pointer_vector.h:76
Pointer data()
Returns a pointer to the underlying array serving as element storage. The pointer is such that range ...
Definition vector.h:343
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
The Vector class is a generic container of objects of type T, that could have fixed or dynamic size,...
Definition vector.h:65
Reference operator()(uint i)
Returns a reference to the element at specified location i. No bounds checking is performed.
Definition vector.h:708
Reference atMod(int i)
Access the specified element, computing first the module of the position w.r.t. the size of the conta...
Definition vector.h:271
Container::reference Reference
A reference to the type of the elements stored in the Vector.
Definition vector.h:91
std::size_t size() const
Returns the size of the container.
Definition vector.h:221
void resize(uint n, const T &v=T())
Resize the Vector to the specified size.
Definition vector.h:557
void erase(uint i)
Remove the element at the specified index from the Vector.
Definition vector.h:664
Container::iterator Iterator
An iterator to the elements of the Vector.
Definition vector.h:102
bool contains(const MakeConstPointerT< T > &e) const
Check if the Vector contains the specified element.
Definition vector.h:471
Reference back()
Access the last element of the Vector.
Definition vector.h:321
bool empty() const noexcept
Returns whether the vector is empty (i.e. whether its size is 0).
Definition vector.h:651
Container::value_type ValueType
The type of the elements stored in the Vector.
Definition vector.h:82
void set(uint i, const T &e)
Set the value of the element at the specified position.
Definition vector.h:366
Container::pointer Pointer
A pointer to the type of the elements stored in the Vector.
Definition vector.h:99
void fill(const T &e)
Fill all elements of the Vector with the specified value.
Definition vector.h:457
Reference at(uint i)
Access the specified element with bounds checking.
Definition vector.h:244
Vector()=default
Creates an empty Vector object.
Iterator find(const MakeConstPointerT< T > &e)
Find the first occurrence of the specified element in the Vector.
Definition vector.h:487
Pointer data()
Returns a pointer to the underlying array serving as element storage. The pointer is such that range ...
Definition vector.h:343
Reference operator[](uint i)
Returns a reference to the element at specified location i. No bounds checking is performed.
Definition vector.h:692
uint indexOf(const MakeConstPointerT< T > &e) const
Get the index of the first occurrence of the specified element in the Vector.
Definition vector.h:519
void pushBack(const T &v)
Add an element to the end of the Vector.
Definition vector.h:573
void insert(uint i, const T &v)
Insert an element at the specified position in the Vector.
Definition vector.h:603
void clear()
Remove all elements from the Vector.
Definition vector.h:678
Iterator end()
Return an iterator pointing to the end of the Vector.
Definition vector.h:732
friend void swap(Vector &a, Vector &b)
Definition vector.h:542
Reference front()
Access the first element of the Vector.
Definition vector.h:301
Iterator begin()
Return an iterator pointing to the beginning of the Vector.
Definition vector.h:725
static const int SIZE
Size of the vector at compile time. It will be -1 if the Vector has dynamic size.
Definition vector.h:111