0.2.0
|
Sorting algorithms. More...
Go to the source code of this file.
Functions | |
template<typename Scalar , int Size> | |
Eigen::Vector< Scalar, Size > | NAV::apply_permutation (const Eigen::Vector< Scalar, Size > &vec, const std::vector< size_t > &p) |
Sort a vector with a permutation. | |
template<typename T > | |
std::vector< T > | NAV::apply_permutation (const std::vector< T > &vec, const std::vector< size_t > &p) |
Sort a std::vector with a permutation. | |
template<typename Derived > | |
Derived::PlainObject | NAV::apply_permutation_colwise (const Eigen::MatrixBase< Derived > &m, const std::vector< size_t > &p) |
Sort a matrix col-wise with a permutation. | |
template<typename Scalar , int Rows, int Cols> | |
void | NAV::apply_permutation_colwise_in_place (Eigen::Matrix< Scalar, Rows, Cols > &m, const std::vector< size_t > &p) |
Sort a matrix col-wise with a permutation. | |
template<typename Scalar , int Size> | |
void | NAV::apply_permutation_in_place (Eigen::Vector< Scalar, Size > &vec, const std::vector< size_t > &p) |
Sort a vector with a permutation. | |
template<typename T > | |
void | NAV::apply_permutation_in_place (std::vector< T > &vec, const std::vector< size_t > &p) |
Sort a std::vector with a permutation. | |
template<typename Derived > | |
Derived::PlainObject | NAV::apply_permutation_rowwise (const Eigen::MatrixBase< Derived > &m, const std::vector< size_t > &p) |
Sort a matrix row-wise with a permutation. | |
template<typename Scalar , int Rows, int Cols> | |
void | NAV::apply_permutation_rowwise_in_place (Eigen::Matrix< Scalar, Rows, Cols > &m, const std::vector< size_t > &p) |
Sort a matrix row-wise with a permutation. | |
template<typename Derived , typename Compare > | |
std::vector< size_t > | NAV::sort_permutation (const Eigen::MatrixBase< Derived > &vec, Compare compare) |
Gives the permutation to sort the vector. | |
template<typename T , typename Compare > | |
std::vector< size_t > | NAV::sort_permutation (const std::vector< T > &vec, Compare compare) |
Gives the permutation to sort the std::vector. | |
Sorting algorithms.
Eigen::Vector< Scalar, Size > NAV::apply_permutation | ( | const Eigen::Vector< Scalar, Size > & | vec, |
const std::vector< size_t > & | p ) |
Sort a vector with a permutation.
vec | Vector to sort |
p | Permutation to sort by |
std::vector< T > NAV::apply_permutation | ( | const std::vector< T > & | vec, |
const std::vector< size_t > & | p ) |
Sort a std::vector with a permutation.
vec | Vector to sort |
p | Permutation to sort by |
Derived::PlainObject NAV::apply_permutation_colwise | ( | const Eigen::MatrixBase< Derived > & | m, |
const std::vector< size_t > & | p ) |
Sort a matrix col-wise with a permutation.
m | Matrix to sort |
p | Permutation to sort by |
void NAV::apply_permutation_colwise_in_place | ( | Eigen::Matrix< Scalar, Rows, Cols > & | m, |
const std::vector< size_t > & | p ) |
Sort a matrix col-wise with a permutation.
m | Matrix to sort |
p | Permutation to sort by |
void NAV::apply_permutation_in_place | ( | Eigen::Vector< Scalar, Size > & | vec, |
const std::vector< size_t > & | p ) |
Sort a vector with a permutation.
vec | Vector to sort |
p | Permutation to sort by |
void NAV::apply_permutation_in_place | ( | std::vector< T > & | vec, |
const std::vector< size_t > & | p ) |
Sort a std::vector with a permutation.
vec | Vector to sort |
p | Permutation to sort by |
Derived::PlainObject NAV::apply_permutation_rowwise | ( | const Eigen::MatrixBase< Derived > & | m, |
const std::vector< size_t > & | p ) |
Sort a matrix row-wise with a permutation.
m | Matrix to sort |
p | Permutation to sort by |
void NAV::apply_permutation_rowwise_in_place | ( | Eigen::Matrix< Scalar, Rows, Cols > & | m, |
const std::vector< size_t > & | p ) |
Sort a matrix row-wise with a permutation.
m | Matrix to sort |
p | Permutation to sort by |
std::vector< size_t > NAV::sort_permutation | ( | const Eigen::MatrixBase< Derived > & | vec, |
Compare | compare ) |
Gives the permutation to sort the vector.
vec | Vector to get the sorting permutation for |
compare | Comparison operator |
std::vector< size_t > NAV::sort_permutation | ( | const std::vector< T > & | vec, |
Compare | compare ) |
Gives the permutation to sort the std::vector.
vec | Vector to get the sorting permutation for |
compare | Comparison operator |