27#define NONE -1 /**< Indicates a root (a node without parent), or an untouched node */
28
29#define UNSYMMETRIC 0 /**< No symmetry is assumed in the matrix */
30#define UPPER 1 /**< Use only upper part of matrix */
31#define LOWER -1 /**< Use only lower part of matrix */
32
33#define AMD 1 /**< Ordering method during the symbolic part of the factorization */
34#define NO_ORDERING 0 /**< No ordering is performed during the symbolic part of the factorization */
35#define GIVEN_ORDERING 2 /**< The ordering was computed previously and is already stored in sym->p */
36
37#define MARKED 1 /**< Indicate whether a node is marked */
38#define UNMARKED 0 /**< Indicate whether a node is not marked */
39
40#define SET_HAS_CHANGED TRUE /**< Possible return value of ladel_set_union indicating the set has changed */
41#define SET_HAS_NOT_CHANGED FALSE /**< Possible return value of ladel_set_union indicating the set has not changed */
42#define MAX_SET_SIZE_EXCEEDED NONE /**< Possible return value of ladel_set_union indicating the set has grown beyond the maximum size */
43
44#define UPDATE TRUE /**< Flag in rank1_update to perform an update */
45#define DOWNDATE FALSE /**< Flag in rank1_update to perform a downdate */
46
47/**
48 * @}
49 */
50
51/**
52 * @defgroup grp-macros Macros
53 * @brief Utility macros.
54 * @{
55 */
56
57#define LADEL_MAX(a, b) ((a) > (b) ? (a) : (b)) /**< Return the maximum of two numbers */
58#define LADEL_MIN(a, b) ((a) > (b) ? (b) : (a)) /**< Return the minimum of two numbers */
59#define LADEL_ABS(a) ((a) < 0 ? -(a) : (a)) /**< Return the absolute value a number */
60
61#define LADEL_FOR(index, M, col) for(index = (M)->p[(col)]; index < (((M)->nz) ? (M)->p[(col)] + (M)->nz[(col)] : (M)->p[(col)+1]); index++) /**< Loop through a column of a sparse matrix */
62
63#define IS_ROOT(col, etree) ((etree)[(col)] == NONE) /**< Check whether a node is a root (i.e. has no parent) */
64
65#define MARK(nodes, k) (nodes[(k)] = MARKED) /**< Mark the k-th node */