#include <algorithm>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <vector>
Go to the source code of this file.
|
| template<typename T > |
| vector< size_t > | sort_indexes (const vector< T > &v) |
| | Determines the permutation vector for ascending order of a vector. More...
|
| |
| vector< size_t > | inverse_indexes (const vector< size_t > &v) |
| |
| template<class T > |
| ostream & | operator<< (ostream &s, const vector< T > &idx) |
| |
| int | main () |
| |
◆ inverse_indexes()
| vector< size_t > inverse_indexes |
( |
const vector< size_t > & |
v | ) |
|
◆ main()
◆ operator<<()
template<class T >
| ostream & operator<< |
( |
ostream & |
s, |
|
|
const vector< T > & |
idx |
|
) |
| |
◆ sort_indexes()
template<typename T >
| vector< size_t > sort_indexes |
( |
const vector< T > & |
v | ) |
|
Determines the permutation vector for ascending order of a vector.
- Parameters
-
| [in] | v | vector to determine sorting indices |
- Returns
- permutation order
- See also
- Ideas in Stack Overflow
Definition at line 58 of file sort_index.cpp.