ucx/comparator.h

changeset 92
7625a8efcc97
parent 91
91595a45fad6
equal deleted inserted replaced
91:91595a45fad6 92:7625a8efcc97
36 */ 36 */
37 37
38 int ucx_intcmp(void *i1, void *i2, void *data); 38 int ucx_intcmp(void *i1, void *i2, void *data);
39 39
40 /** 40 /**
41 * Compares two real numbers of type float.
42 * @param f1 pointer to float one
43 * @param f2 pointer to float two
44 * @param if provided: a pointer to precision (default: 1e-6f)
45 * @return -1, if *f1 is less than *f2, 0 if both are equal,
46 * 1 if *f1 is greater than *f2
47 */
48
49 int ucx_floatcmp(void *f1, void *f2, void *data);
50
51 /**
52 * Compares two real numbers of type double.
53 * @param f1 pointer to double one
54 * @param f2 pointer to double two
55 * @param if provided: a pointer to precision (default: 1e-14)
56 * @return -1, if *d1 is less than *d2, 0 if both are equal,
57 * 1 if *d1 is greater than *d2
58 */
59
60 int ucx_doublecmp(void *d1, void *d2, void *data);
61
62 /**
41 * Compares two pointers. 63 * Compares two pointers.
42 * @param ptr1 pointer one 64 * @param ptr1 pointer one
43 * @param ptr2 pointer two 65 * @param ptr2 pointer two
44 * @param data omitted 66 * @param data omitted
45 * @return -1 if ptr1 is less than ptr2, 0 if both are equal, 67 * @return -1 if ptr1 is less than ptr2, 0 if both are equal,

mercurial