Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
|
Class that wraps objects that export the std::vector interface. More...
#include <cheetah/data/VectorLike.h>
Public Member Functions | |
VectorLike () | |
Construct a VectorLike instance. | |
VectorLike (AllocatorType const &allocator) | |
Construct a VectorLike instance with an explicit allocator. | |
template<typename... Args> | |
VectorLike (std::size_t n, Args &&... args) | |
Construct a VectorLike instance of a given size. More... | |
VectorLike (std::size_t n, const ValueType &value, AllocatorType const &allocator=AllocatorType()) | |
Construct a filled VectorLike instance of a given size. More... | |
std::size_t | size () const |
Retrieve the size of the underlying vector. | |
ValueType const & | front () const |
the first emelment | |
ValueType & | front () |
ValueType const & | back () const |
the last emelment | |
ValueType & | back () |
void | resize (std::size_t size, const ValueType &x=ValueType()) |
Resize the vector. More... | |
Reference | operator[] (std::size_t n) |
Subscript access to the data contained in the underlying vector. More... | |
ConstReference | operator[] (std::size_t n) const |
Subscript Read-only access to the data contained in the underlying vector. More... | |
Iterator | begin () |
An iterator pointing to the start of the vector. More... | |
ConstIterator | begin () const |
A constant iterator pointing to the start of the vector. More... | |
ConstIterator | cbegin () const |
ReverseIterator | rbegin () |
A reverse iterator pointing to the end of the vector (i.e the last element). | |
Iterator | end () |
An iterator pointing to the end of the vector. More... | |
ConstIterator | end () const |
A constant iterator pointing to the end of the vector. More... | |
ConstIterator | cend () const |
A constant iterator pointing to the end of the vector. More... | |
ReverseIterator | rend () |
Pointer | data () |
Return a pointer pointing to the start of the vector. More... | |
ConstPointer | data () const |
Return a constant pointer pointing to the start of the vector. More... | |
void | push_back (ValueType const &value) |
Appends element to end of vector. More... | |
template<typename ... Args> | |
void | emplace_back (Args &&... value) |
Appends element to end of vector using the move operator. More... | |
void | reserve (std::size_t size) |
Reserve space for this many elements. More... | |
std::size_t | capacity () const |
The reseved size of the vector. More... | |
void | swap (VectorLike &v) |
swaps the contents of this vector_base with another vector More... | |
Iterator | erase (Iterator pos) |
erase the element from a given position or a range of positions | |
Iterator | erase (Iterator first, Iterator last) |
Iterator | insert (Iterator pos, const ValueType &value) |
insert a value in the vector_base | |
ConstIterator | insert (ConstIterator pos, ValueType &&value) |
ConstIterator | insert (ConstIterator pos, const ValueType &value) |
Iterator | insert (Iterator pos, ValueType &&value) |
template<typename... Args> | |
Iterator | emplace (Iterator pos, Args &&...) |
template<typename... Args> | |
ConstIterator | emplace (ConstIterator pos, Args &&...) |
SelfType & | operator+= (SelfType const &) |
add the contents of the argument to the current vector | |
bool | empty () const |
return true if the vector is empty | |
void | clear () |
clear the data | |
AllocatorType | allocator () const |
return the allocator | |
template<typename... Args> | |
VectorLike< VectorType >::Iterator | emplace (Iterator pos, Args &&... values) |
template<typename... Args> | |
VectorLike< VectorType >::ConstIterator | emplace (ConstIterator pos, Args &&... values) |
Class that wraps objects that export the std::vector interface.
This class is used to provide interoperability between thrust vectors and std::vectors such that both can be used as template arguments for the Series class (from which TimeSeries, FrequencySeries, etc. are derived)
VectorType | The underlying vector type to be wrapped |
Definition at line 44 of file VectorLike.h.
|
explicit |
Construct a VectorLike instance of a given size.
[in] | n | The size of the underlying vector. |
Definition at line 49 of file VectorLike.cpp.
|
explicit |
Construct a filled VectorLike instance of a given size.
[in] | n | The size of the underlying vector. |
[in] | value | The fill value |
Definition at line 55 of file VectorLike.cpp.
VectorLike< VectorType >::Iterator ska::cheetah::data::VectorLike< VectorType >::begin | ( | ) |
An iterator pointing to the start of the vector.
Definition at line 85 of file VectorLike.cpp.
VectorLike< VectorType >::ConstIterator ska::cheetah::data::VectorLike< VectorType >::begin | ( | ) | const |
A constant iterator pointing to the start of the vector.
Definition at line 91 of file VectorLike.cpp.
std::size_t ska::cheetah::data::VectorLike< VectorType >::capacity | ( | ) | const |
The reseved size of the vector.
Definition at line 164 of file VectorLike.cpp.
VectorLike< VectorType >::ConstIterator ska::cheetah::data::VectorLike< VectorType >::cend | ( | ) | const |
A constant iterator pointing to the end of the vector.
Definition at line 121 of file VectorLike.cpp.
VectorLike< VectorType >::Pointer ska::cheetah::data::VectorLike< VectorType >::data | ( | ) |
Return a pointer pointing to the start of the vector.
Definition at line 133 of file VectorLike.cpp.
VectorLike< VectorType >::ConstPointer ska::cheetah::data::VectorLike< VectorType >::data | ( | ) | const |
Return a constant pointer pointing to the start of the vector.
Definition at line 139 of file VectorLike.cpp.
void ska::cheetah::data::VectorLike< VectorType >::emplace_back | ( | Args &&... | value | ) |
Appends element to end of vector using the move operator.
[in] | value | element to add to end of vector |
Definition at line 152 of file VectorLike.cpp.
VectorLike< VectorType >::Iterator ska::cheetah::data::VectorLike< VectorType >::end | ( | ) |
An iterator pointing to the end of the vector.
Definition at line 109 of file VectorLike.cpp.
VectorLike< VectorType >::ConstIterator ska::cheetah::data::VectorLike< VectorType >::end | ( | ) | const |
A constant iterator pointing to the end of the vector.
Definition at line 115 of file VectorLike.cpp.
VectorLike< VectorType >::Reference ska::cheetah::data::VectorLike< VectorType >::operator[] | ( | std::size_t | n | ) |
Subscript access to the data contained in the underlying vector.
[in] | n | The index of the elemment to be accessed. |
Definition at line 73 of file VectorLike.cpp.
VectorLike< VectorType >::ConstReference ska::cheetah::data::VectorLike< VectorType >::operator[] | ( | std::size_t | n | ) | const |
Subscript Read-only access to the data contained in the underlying vector.
[in] | n | The index of the elemment to be accessed. |
Definition at line 79 of file VectorLike.cpp.
void ska::cheetah::data::VectorLike< VectorType >::push_back | ( | ValueType const & | value | ) |
Appends element to end of vector.
[in] | value | element to add to end of vector |
Definition at line 145 of file VectorLike.cpp.
VectorLike< VectorType >::ReverseIterator ska::cheetah::data::VectorLike< VectorType >::rend | ( | ) |
@ brief A reverse iterator pointing to the beginning of the vector
Definition at line 127 of file VectorLike.cpp.
void ska::cheetah::data::VectorLike< VectorType >::reserve | ( | std::size_t | size | ) |
Reserve space for this many elements.
[in] | size | The number of elements |
Definition at line 158 of file VectorLike.cpp.
void ska::cheetah::data::VectorLike< VectorType >::resize | ( | std::size_t | size, |
const ValueType & | x = ValueType() |
||
) |
Resize the vector.
[in] | size | The new size of the vector |
Definition at line 67 of file VectorLike.cpp.
void ska::cheetah::data::VectorLike< VectorType >::swap | ( | VectorLike< VectorType > & | v | ) |
swaps the contents of this vector_base with another vector
v | The vector with which to swap. |
Definition at line 170 of file VectorLike.cpp.