Volume Cartographer 2.27.0
|
Holds a collection of points. More...
#include <vc/core/types/PointSet.hpp>
Public Types | |
using | Point = T |
using | value_type = Point |
using | Container = std::vector< Point > |
using | Iterator = typename Container::iterator |
using | ConstIterator = typename Container::const_iterator |
using | Pointer = std::shared_ptr< PointSet< T > > |
Public Member Functions | |
PointSet ()=default | |
Default constructor. | |
PointSet (std::size_t initSize) | |
Construct and preallocate a number of Point elements. More... | |
PointSet (std::size_t initSize, T initVal) | |
Construct and fill a number of elements with an initial value. More... | |
const T & | operator[] (std::size_t idx) const |
Get a Point by index. More... | |
T & | operator[] (std::size_t idx) |
Get a Point by index. More... | |
std::size_t | size () const |
Get the size of the PointSet. More... | |
bool | empty () const |
Return whether the PointSet is empty. More... | |
Container | as_vector () |
Get the PointSet storage container. More... | |
void | clear () |
Remove all elements from the PointSet. More... | |
void | push_back (const T &val) |
Add a Point to the PointSet. More... | |
void | push_back (T &&val) |
template<class... Args> | |
void | emplace_back (Args &&... args) |
Emplace a Point at the back of the PointSet. More... | |
template<class ContainerType > | |
void | append (const ContainerType &c) |
Append a PointSet to the end of the current one. More... | |
Iterator | begin () |
Return an iterator that points to the first element in the PointSet. More... | |
ConstIterator | begin () const |
Return an iterator that points to the first element in the PointSet. More... | |
Iterator | end () |
Return an iterator that points to the past-the-end element in the PointSet. More... | |
ConstIterator | end () const |
Return an iterator that points to the past-the-end element in the PointSet. More... | |
T & | front () |
Return a reference to the first element in the PointSet. More... | |
const T & | front () const |
Return a reference to the first element in the PointSet. More... | |
T & | back () |
Return a reference to the last element in the PointSet. More... | |
const T & | back () const |
Return a reference to the last element in the PointSet. More... | |
T | min () const |
Return the element with the smallest absolute norm (L2) More... | |
T | max () const |
Return the element with the largest absolute norm (L2) More... | |
std::pair< T, T > | minMax () const |
Return a pair of elements containing the points with the smallest and largest absolute norm (L2) More... | |
Static Public Member Functions | |
static PointSet | Fill (std::size_t initSize, T initVal) |
Create a PointSet of a specific size, filled with an initial value. More... | |
Static Public Attributes | |
static constexpr int | FORMAT_VERSION = 1 |
static constexpr auto | HEADER_TERMINATOR = "<>" |
static constexpr auto | HEADER_TERMINATOR_REGEX = "^<>$" |
Protected Attributes | |
Container | data_ |
Holds a collection of points.
Definition at line 25 of file PointSet.hpp.
using volcart::PointSet< T >::ConstIterator = typename Container::const_iterator |
Const iterator type
Definition at line 42 of file PointSet.hpp.
using volcart::PointSet< T >::Container = std::vector<Point> |
Container type. Defines the underlying data structure. Should supply an STL compliant interface.
Definition at line 36 of file PointSet.hpp.
using volcart::PointSet< T >::Iterator = typename Container::iterator |
Iterator type
Definition at line 39 of file PointSet.hpp.
using volcart::PointSet< T >::Point = T |
Point type
Definition at line 29 of file PointSet.hpp.
using volcart::PointSet< T >::Pointer = std::shared_ptr<PointSet<T> > |
Pointer type
Definition at line 54 of file PointSet.hpp.
using volcart::PointSet< T >::value_type = Point |
Iterator value type
Definition at line 32 of file PointSet.hpp.
|
inlineexplicit |
Construct and preallocate a number of Point elements.
Definition at line 61 of file PointSet.hpp.
|
inlineexplicit |
Construct and fill a number of elements with an initial value.
Definition at line 64 of file PointSet.hpp.
|
inline |
Append a PointSet to the end of the current one.
Definition at line 116 of file PointSet.hpp.
|
inline |
Get the PointSet storage container.
Definition at line 94 of file PointSet.hpp.
|
inline |
Return a reference to the last element in the PointSet.
Definition at line 144 of file PointSet.hpp.
|
inline |
Return a reference to the last element in the PointSet.
Definition at line 147 of file PointSet.hpp.
|
inline |
Return an iterator that points to the first element in the PointSet.
Definition at line 125 of file PointSet.hpp.
|
inline |
Return an iterator that points to the first element in the PointSet.
Definition at line 128 of file PointSet.hpp.
|
inline |
Remove all elements from the PointSet.
Definition at line 97 of file PointSet.hpp.
|
inline |
Emplace a Point at the back of the PointSet.
Definition at line 109 of file PointSet.hpp.
|
inline |
Return whether the PointSet is empty.
Definition at line 91 of file PointSet.hpp.
|
inline |
Return an iterator that points to the past-the-end element in the PointSet.
Definition at line 132 of file PointSet.hpp.
|
inline |
Return an iterator that points to the past-the-end element in the PointSet.
Definition at line 135 of file PointSet.hpp.
|
inlinestatic |
Create a PointSet of a specific size, filled with an initial value.
Definition at line 199 of file PointSet.hpp.
|
inline |
Return a reference to the first element in the PointSet.
Definition at line 138 of file PointSet.hpp.
|
inline |
Return a reference to the first element in the PointSet.
Definition at line 141 of file PointSet.hpp.
|
inline |
Return the element with the largest absolute norm (L2)
cv::_InputArray
. Definition at line 169 of file PointSet.hpp.
|
inline |
Return the element with the smallest absolute norm (L2)
cv::_InputArray
. Definition at line 155 of file PointSet.hpp.
|
inline |
Return a pair of elements containing the points with the smallest and largest absolute norm (L2)
cv::_InputArray
. Definition at line 184 of file PointSet.hpp.
|
inline |
Get a Point by index.
Definition at line 79 of file PointSet.hpp.
|
inline |
Get a Point by index.
Definition at line 72 of file PointSet.hpp.
|
inline |
Add a Point to the PointSet.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 102 of file PointSet.hpp.
|
inline |
Definition at line 105 of file PointSet.hpp.
|
inline |
Get the size of the PointSet.
Definition at line 88 of file PointSet.hpp.
|
protected |
Point container
Definition at line 207 of file PointSet.hpp.
|
staticconstexpr |
PointSet version number
Definition at line 45 of file PointSet.hpp.
|
staticconstexpr |
PointSet header terminator
Definition at line 48 of file PointSet.hpp.
|
staticconstexpr |
Regex for header terminator
Definition at line 51 of file PointSet.hpp.