9.0
general documentation
Loading...
Searching...
No Matches
cs_sort_partition.h File Reference
#include "base/cs_defs.h"
#include <stdio.h>
Include dependency graph for cs_sort_partition.h:

Go to the source code of this file.

Typedefs

typedef void cs_sort_partition_s_to_elt_t(double s, void *elt, const void *input)
 function pointer for conversion of a double precision value in range [0, 1] to a given element.
typedef int cs_sort_partition_compare_t(const void *elt1, const void *elt2, const void *input)
 function pointer for comparison of 2 elements.

Typedef Documentation

◆ cs_sort_partition_compare_t

typedef int cs_sort_partition_compare_t(const void *elt1, const void *elt2, const void *input)

function pointer for comparison of 2 elements.

This function is the same type as that used by qsort_r.

Remarks
for simplicity, calling functions assume the input is shared between cs_sort_partition_s_to_elt_t and cs_sort_partition_compare_t functions (as they use both).
Parameters
[in]elt1coordinate between 0 and 1
[in]elt2pointer to optional (untyped) value or structure.
[in]inputpointer to optional (untyped) value or structure.
Returns
< 0 if elt1 < elt2, 0 if elt1 == elt2, > 0 if elt1 > elt2

◆ cs_sort_partition_s_to_elt_t

typedef void cs_sort_partition_s_to_elt_t(double s, void *elt, const void *input)

function pointer for conversion of a double precision value in range [0, 1] to a given element.

Remarks
for simplicity, calling functions assume the input is shared between cs_sort_partition_s_to_elt_t and cs_sort_partition_compare_t functions (as they use both).
Parameters
[in]scoordinate between 0 and 1
[out]eltpointer to element
[in]inputpointer to optional (untyped) value or structure.