#ifndef NDEBUG
#define NDEBUG
#endif
#include <stdlib.h>
#if !defined(NPRINT) || !defined(NDEBUG)
#include <stdio.h>
#endif
#include <limits.h>
#include <math.h>
#ifdef MATLAB_MEX_FILE
#include "matrix.h"
#include "mex.h"
#endif
#ifdef FLIP
#undef FLIP
#endif
#ifdef MAX
#undef MAX
#endif
#ifdef MIN
#undef MIN
#endif
#ifdef EMPTY
#undef EMPTY
#endif
#ifdef GLOBAL
#undef GLOBAL
#endif
#ifdef PRIVATE
#undef PRIVATE
#endif
#define EMPTY (-1)
#define FLIP(i) (-(i)-2)
#define UNFLIP(i) ((i < EMPTY) ? FLIP (i) : (i))
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#define IMPLIES(p,q) (!(p) || (q))
#ifdef TRUE
#undef TRUE
#endif
#ifdef FALSE
#undef FALSE
#endif
#define TRUE (1)
#define FALSE (0)
#define PRIVATE static
#define GLOBAL
#define EMPTY (-1)
#ifdef NULL
#undef NULL
#endif
#define NULL 0
#ifndef SIZE_T_MAX
#ifdef SIZE_MAX
#define SIZE_T_MAX SIZE_MAX
#else
#define SIZE_T_MAX ((size_t) (-1))
#endif
#endif
#include "camd.h"
#if defined (DLONG) || defined (ZLONG)
#define Int SuiteSparse_long
#define ID SuiteSparse_long_id
#define Int_MAX SuiteSparse_long_max
#define CAMD_order camd_l_order
#define CAMD_defaults camd_l_defaults
#define CAMD_control camd_l_control
#define CAMD_info camd_l_info
#define CAMD_1 camd_l1
#define CAMD_2 camd_l2
#define CAMD_valid camd_l_valid
#define CAMD_cvalid camd_l_cvalid
#define CAMD_aat camd_l_aat
#define CAMD_postorder camd_l_postorder
#define CAMD_post_tree camd_l_post_tree
#define CAMD_dump camd_l_dump
#define CAMD_debug camd_l_debug
#define CAMD_debug_init camd_l_debug_init
#define CAMD_preprocess camd_l_preprocess
#else
#define Int int
#define ID "%d"
#define Int_MAX INT_MAX
#define CAMD_order camd_order
#define CAMD_defaults camd_defaults
#define CAMD_control camd_control
#define CAMD_info camd_info
#define CAMD_1 camd_1
#define CAMD_2 camd_2
#define CAMD_valid camd_valid
#define CAMD_cvalid camd_cvalid
#define CAMD_aat camd_aat
#define CAMD_postorder camd_postorder
#define CAMD_post_tree camd_post_tree
#define CAMD_dump camd_dump
#define CAMD_debug camd_debug
#define CAMD_debug_init camd_debug_init
#define CAMD_preprocess camd_preprocess
#endif
GLOBAL size_t CAMD_aat
(
Int n,
const Int Ap [ ],
const Int Ai [ ],
Int Len [ ],
Int Tp [ ],
double Info [ ]
) ;
GLOBAL void CAMD_1
(
Int n,
const Int Ap [ ],
const Int Ai [ ],
Int P [ ],
Int Pinv [ ],
Int Len [ ],
Int slen,
Int S [ ],
double Control [ ],
double Info [ ],
const Int C [ ]
) ;
GLOBAL Int CAMD_postorder
(
Int j, Int k, Int n, Int head [], Int next [], Int post [], Int stack []
) ;
GLOBAL void CAMD_preprocess
(
Int n,
const Int Ap [ ],
const Int Ai [ ],
Int Rp [ ],
Int Ri [ ],
Int W [ ],
Int Flag [ ]
) ;
#ifndef NDEBUG
#include <assert.h>
#ifndef EXTERN
#define EXTERN extern
#endif
EXTERN Int CAMD_debug ;
GLOBAL void CAMD_debug_init ( char *s ) ;
GLOBAL void CAMD_dump
(
Int n,
Int Pe [ ],
Int Iw [ ],
Int Len [ ],
Int iwlen,
Int pfree,
Int Nv [ ],
Int Next [ ],
Int Last [ ],
Int Head [ ],
Int Elen [ ],
Int Degree [ ],
Int W [ ],
Int nel,
Int BucketSet [],
const Int C [],
Int Curc
) ;
#ifdef ASSERT
#undef ASSERT
#endif
#ifdef MATLAB_MEX_FILE
#define ASSERT(expression) (mxAssert ((expression), ""))
#else
#define ASSERT(expression) (assert (expression))
#endif
#define CAMD_DEBUG0(params) { SUITESPARSE_PRINTF (params) ; }
#define CAMD_DEBUG1(params) \
{ if (CAMD_debug >= 1) SUITESPARSE_PRINTF (params) ; }
#define CAMD_DEBUG2(params) \
{ if (CAMD_debug >= 2) SUITESPARSE_PRINTF (params) ; }
#define CAMD_DEBUG3(params) \
{ if (CAMD_debug >= 3) SUITESPARSE_PRINTF (params) ; }
#define CAMD_DEBUG4(params) \
{ if (CAMD_debug >= 4) SUITESPARSE_PRINTF (params) ; }
#else
#define ASSERT(expression)
#define CAMD_DEBUG0(params)
#define CAMD_DEBUG1(params)
#define CAMD_DEBUG2(params)
#define CAMD_DEBUG3(params)
#define CAMD_DEBUG4(params)
#endif