Vector Utility functions.
More...
Go to the source code of this file.
|
template<typename Scalar> |
std::vector< Scalar > | NAV::genRangeVector (Scalar start, Scalar stepSize, Scalar end) |
| Returns a container filled with the given range.
|
|
template<typename T> |
void | NAV::move (std::vector< T > &v, size_t sourceIdx, size_t targetIdx) |
| Moves an element within a vector to a new position.
|
|
template<typename T> |
bool | NAV::operator== (const std::vector< T > &lhs, std::span< const T > rhs) |
| Comparison operator for span and vector.
|
|
template<typename T> |
bool | NAV::operator== (std::span< const T > lhs, const std::vector< T > &rhs) |
| Comparison operator for span and vector.
|
|
◆ genRangeVector()
template<typename Scalar>
std::vector< Scalar > NAV::genRangeVector |
( |
Scalar | start, |
|
|
Scalar | stepSize, |
|
|
Scalar | end ) |
Returns a container filled with the given range.
- Parameters
-
start | Inclusive start value of the range |
stepSize | Step size of the range |
end | Exclusive end value of the range |
◆ move()
template<typename T>
void NAV::move |
( |
std::vector< T > & | v, |
|
|
size_t | sourceIdx, |
|
|
size_t | targetIdx ) |
Moves an element within a vector to a new position.
- Parameters
-
[in,out] | v | Vector with the elements |
[in] | sourceIdx | Old index which will be moved |
[in] | targetIdx | New index which is the target |
◆ operator==() [1/2]
template<typename T>
bool NAV::operator== |
( |
const std::vector< T > & | lhs, |
|
|
std::span< const T > | rhs ) |
|
nodiscard |
Comparison operator for span and vector.
- Parameters
-
lhs | Left-hand side |
rhs | Right-hand side |
- Returns
- True if all elements are equal
◆ operator==() [2/2]
template<typename T>
bool NAV::operator== |
( |
std::span< const T > | lhs, |
|
|
const std::vector< T > & | rhs ) |
|
nodiscard |
Comparison operator for span and vector.
- Parameters
-
lhs | Left-hand side |
rhs | Right-hand side |
- Returns
- True if all elements are equal