ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
myqsort.c File Reference
#include "metis.h"
Include dependency graph for myqsort.c:

Go to the source code of this file.

Macros

#define THRESH   1 /* threshold for insertion */
 
#define MTHRESH   6 /* threshold for median */
 

Functions

static void siqst (idxtype *, idxtype *)
 
static void iiqst (int *, int *)
 
static void keyiqst (KeyValueType *, KeyValueType *)
 
static void keyvaliqst (KeyValueType *, KeyValueType *)
 
void iidxsort (int n, idxtype *base)
 
void iintsort (int n, int *base)
 
void ikeysort (int n, KeyValueType *base)
 
void ikeyvalsort (int n, KeyValueType *base)
 

Macro Definition Documentation

◆ MTHRESH

#define MTHRESH   6 /* threshold for median */

Definition at line 18 of file myqsort.c.

◆ THRESH

#define THRESH   1 /* threshold for insertion */

Definition at line 17 of file myqsort.c.

Function Documentation

◆ iidxsort()

void iidxsort ( int  n,
idxtype base 
)

Definition at line 32 of file myqsort.c.

References max(), min(), siqst(), and THRESH.

◆ iintsort()

void iintsort ( int  n,
int *  base 
)

Definition at line 161 of file myqsort.c.

References iiqst(), max(), min(), and THRESH.

◆ iiqst()

static void iiqst ( int *  base,
int *  max 
)
static

Definition at line 207 of file myqsort.c.

References max(), MTHRESH, cloudViewer::utility::swap(), and THRESH.

Referenced by iintsort().

◆ ikeysort()

void ikeysort ( int  n,
KeyValueType base 
)

Definition at line 291 of file myqsort.c.

References KeyValueType::key, keyiqst(), max(), min(), and THRESH.

◆ ikeyvalsort()

void ikeyvalsort ( int  n,
KeyValueType base 
)

Definition at line 427 of file myqsort.c.

References KeyValueType::key, keyvaliqst(), max(), min(), THRESH, and KeyValueType::val.

◆ keyiqst()

static void keyiqst ( KeyValueType base,
KeyValueType max 
)
static

Definition at line 345 of file myqsort.c.

References KeyValueType::key, max(), MTHRESH, cloudViewer::utility::swap(), and THRESH.

Referenced by ikeysort().

◆ keyvaliqst()

static void keyvaliqst ( KeyValueType base,
KeyValueType max 
)
static

Definition at line 473 of file myqsort.c.

References KeyValueType::key, max(), MTHRESH, cloudViewer::utility::swap(), THRESH, and KeyValueType::val.

Referenced by ikeyvalsort().

◆ siqst()

static void siqst ( idxtype base,
idxtype max 
)
static

Definition at line 77 of file myqsort.c.

References max(), MTHRESH, cloudViewer::utility::swap(), and THRESH.

Referenced by iidxsort().