SAF
Loading...
Searching...
No Matches
saf_utility_sort.h File Reference

A collection of useful sorting functions. More...

Go to the source code of this file.

Functions

void sorti (int *in_vec, int *out_vec, int *new_indices, int len, int descendFLAG)
 Sort a vector of integer values into ascending/decending order (optionally returning the new indices as well)
 
void sortf (float *in_vec, float *out_vec, int *new_indices, int len, int descendFLAG)
 Sort a vector of floating-point values into ascending/decending order (optionally returning the new indices as well)
 
void sortd (double *in_vec, double *out_vec, int *new_indices, int len, int descendFLAG)
 Sort a vector of double floating-point values into ascending/decending order (optionally returning the new indices as well)
 
void sortc (float_complex *in_vec, float_complex *out_vec, int len, int descendFLAG)
 Sort a vector of complex floating-point values into ascending/decending order.
 
void sortz (double_complex *in_vec, double_complex *out_vec, int len, int descendFLAG)
 Sort a vector of complex double floating-point values into ascending/ decending order.
 
void cmplxPairUp (double_complex *in_vec, double_complex *out_vec, int len)
 Pairs up complex numbers and sorts them in ascending order based on their real parts first, and then on their imaginary parts.
 
void findClosestGridPoints (float *grid_dirs, int nGrid, float *target_dirs, int nTarget, int degFLAG, int *idx_closest, float *dirs_closest, float *angle_diff)
 Finds indicies into "grid_dirs" that are the closest to "target dirs".
 
void findClosestGridPointsCartesian (float *grid_dirs_xyz, int nGrid, float *target_dirs_xyz, int nTarget, int *idx_closest, float *dirs_xyz_closest, float *angle_diff)
 Finds indicies into "grid_dirs_xyz" that are the closest to "target dirs_xyz".
 

Detailed Description

A collection of useful sorting functions.

Author
Leo McCormack
Date
30.07.2018
License
ISC

Definition in file saf_utility_sort.h.