0.2.0
Loading...
Searching...
No Matches
Vector.hpp File Reference

Vector Utility functions. More...

Go to the source code of this file.

Functions

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.
 

Detailed Description

Vector Utility functions.

Author
T. Topp (topp@.nosp@m.ins..nosp@m.uni-s.nosp@m.tutt.nosp@m.gart..nosp@m.de)
Date
2022-03-07

Function Documentation

◆ genRangeVector()

template<typename Scalar >
std::vector< Scalar > NAV::genRangeVector ( Scalar start,
Scalar stepSize,
Scalar end )

Returns a container filled with the given range.

Parameters
startInclusive start value of the range
stepSizeStep size of the range
endExclusive 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]vVector with the elements
[in]sourceIdxOld index which will be moved
[in]targetIdxNew index which is the target