NpySort

Function Usage

This function is the constructor of the NumPy sorting algorithm.

Prototype

explicit NpySort() = default;
NpySort(std::vector<float> preSortVec, std::vector<int> sortIdx);

Parameter Description

Parameter

Input/Output

Description

preSortVec

Input

Array to be sorted, whose length is greater than 0.

sortIdx

Input

Index array to be sorted.

The minimum value of a single index is 0, and the maximum value equals to the array length minus 1. The length is the same as that of the array to be sorted.