added CCOLAMD, changed colamd compile from C++ to C compiler, added extern accordingly
parent
e73f56f817
commit
39d18328e6
33
.cproject
33
.cproject
|
@ -12,8 +12,7 @@
|
|||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
|
@ -300,6 +299,22 @@
|
|||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
|
||||
<buildTargets>
|
||||
<target name="all" path="colamd" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments/>
|
||||
<buildTarget>all</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
<target name="clean" path="colamd" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments/>
|
||||
<buildTarget>clean</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
<target name="install" path="wrap" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments>-j2</buildArguments>
|
||||
|
@ -318,7 +333,6 @@
|
|||
</target>
|
||||
<target name="clean" path="wrap" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments/>
|
||||
<buildTarget>clean</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
|
@ -478,6 +492,7 @@
|
|||
</target>
|
||||
<target name="testBayesTree.run" path="cpp" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments/>
|
||||
<buildTarget>testBayesTree.run</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>false</useDefaultCommand>
|
||||
|
@ -485,7 +500,6 @@
|
|||
</target>
|
||||
<target name="testSymbolicBayesNet.run" path="cpp" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments/>
|
||||
<buildTarget>testSymbolicBayesNet.run</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>false</useDefaultCommand>
|
||||
|
@ -493,6 +507,7 @@
|
|||
</target>
|
||||
<target name="testSymbolicFactorGraph.run" path="cpp" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments/>
|
||||
<buildTarget>testSymbolicFactorGraph.run</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>false</useDefaultCommand>
|
||||
|
@ -684,6 +699,7 @@
|
|||
</target>
|
||||
<target name="testGraph.run" path="cpp" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments/>
|
||||
<buildTarget>testGraph.run</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>false</useDefaultCommand>
|
||||
|
@ -739,7 +755,6 @@
|
|||
</target>
|
||||
<target name="testSimulated2D.run" path="cpp" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments/>
|
||||
<buildTarget>testSimulated2D.run</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>false</useDefaultCommand>
|
||||
|
@ -787,6 +802,7 @@
|
|||
</target>
|
||||
<target name="testErrors.run" path="cpp" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments/>
|
||||
<buildTarget>testErrors.run</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>false</useDefaultCommand>
|
||||
|
@ -794,6 +810,7 @@
|
|||
</target>
|
||||
<target name="testDSF.run" path="cpp" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments/>
|
||||
<buildTarget>testDSF.run</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
|
@ -809,6 +826,7 @@
|
|||
</target>
|
||||
<target name="testConstraintOptimizer.run" path="cpp" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments/>
|
||||
<buildTarget>testConstraintOptimizer.run</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
|
@ -816,7 +834,6 @@
|
|||
</target>
|
||||
<target name="testBTree.run" path="cpp" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments/>
|
||||
<buildTarget>testBTree.run</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
|
@ -824,6 +841,7 @@
|
|||
</target>
|
||||
<target name="testSimulated2DOriented.run" path="cpp" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments/>
|
||||
<buildTarget>testSimulated2DOriented.run</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>false</useDefaultCommand>
|
||||
|
@ -831,7 +849,6 @@
|
|||
</target>
|
||||
<target name="testDSFVector.run" path="cpp" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments/>
|
||||
<buildTarget>testDSFVector.run</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
|
@ -839,7 +856,6 @@
|
|||
</target>
|
||||
<target name="testSPQRUtil.run" path="cpp" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments/>
|
||||
<buildTarget>testSPQRUtil.run</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
|
@ -847,7 +863,6 @@
|
|||
</target>
|
||||
<target name="testInference.run" path="cpp" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments/>
|
||||
<buildTarget>testInference.run</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
all: libcolamd.a
|
||||
|
||||
CC ?= gcc
|
||||
CXX ?= g++
|
||||
CXXFLAGS += -O2
|
||||
CXXFLAGS += -fPIC
|
||||
CFLAGS += -O2
|
||||
CFLAGS += -fPIC
|
||||
|
||||
|
||||
sources = $(shell ls *.c)
|
||||
|
@ -17,11 +16,9 @@ library = libcolamd.a
|
|||
#Note: hack was added to ensure that flags are acutally used for compilation
|
||||
# This should probably be fixed, but will work for 64 bit machines now
|
||||
|
||||
$(library):
|
||||
$(CXX) $(CXXFLAGS) -c -o colamd.o colamd.c
|
||||
$(CXX) $(CXXFLAGS) -c -DDLONG -o colamd_l.o colamd.c
|
||||
$(CXX) $(CXXFLAGS) -c -o colamd_global.o colamd_global.c
|
||||
ar crsv $@ colamd.o colamd_l.o colamd_global.o
|
||||
$(library): colamd.o colamd_global.o ccolamd.o ccolamd_global.o
|
||||
$(CC) $(CFLAGS) -c -DDLONG -o colamd_l.o colamd.c
|
||||
ar crsv $@ $^ colamd_l.o
|
||||
ranlib $(library)
|
||||
|
||||
clean:
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,365 @@
|
|||
/* ========================================================================== */
|
||||
/* === CCOLAMD/ccolamd.h ==================================================== */
|
||||
/* ========================================================================== */
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* CCOLAMD Copyright (C), Univ. of Florida. Authors: Timothy A. Davis,
|
||||
* Sivasankaran Rajamanickam, and Stefan Larimore
|
||||
* See License.txt for the Version 2.1 of the GNU Lesser General Public License
|
||||
* http://www.cise.ufl.edu/research/sparse
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* You must include this file (ccolamd.h) in any routine that uses ccolamd,
|
||||
* csymamd, or the related macros and definitions.
|
||||
*/
|
||||
|
||||
#ifndef CCOLAMD_H
|
||||
#define CCOLAMD_H
|
||||
|
||||
/* make it easy for C++ programs to include CCOLAMD */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* for size_t definition: */
|
||||
#include <stdlib.h>
|
||||
|
||||
/* ========================================================================== */
|
||||
/* === CCOLAMD version ====================================================== */
|
||||
/* ========================================================================== */
|
||||
|
||||
/* All versions of CCOLAMD will include the following definitions.
|
||||
* As an example, to test if the version you are using is 1.3 or later:
|
||||
*
|
||||
* if (CCOLAMD_VERSION >= CCOLAMD_VERSION_CODE (1,3)) ...
|
||||
*
|
||||
* This also works during compile-time:
|
||||
*
|
||||
* #if CCOLAMD_VERSION >= CCOLAMD_VERSION_CODE (1,3)
|
||||
* printf ("This is version 1.3 or later\n") ;
|
||||
* #else
|
||||
* printf ("This is an early version\n") ;
|
||||
* #endif
|
||||
*/
|
||||
|
||||
#define CCOLAMD_DATE "Nov 30, 2009"
|
||||
#define CCOLAMD_VERSION_CODE(main,sub) ((main) * 1000 + (sub))
|
||||
#define CCOLAMD_MAIN_VERSION 2
|
||||
#define CCOLAMD_SUB_VERSION 7
|
||||
#define CCOLAMD_SUBSUB_VERSION 2
|
||||
#define CCOLAMD_VERSION \
|
||||
CCOLAMD_VERSION_CODE(CCOLAMD_MAIN_VERSION,CCOLAMD_SUB_VERSION)
|
||||
|
||||
/* ========================================================================== */
|
||||
/* === Knob and statistics definitions ====================================== */
|
||||
/* ========================================================================== */
|
||||
|
||||
/* size of the knobs [ ] array. Only knobs [0..3] are currently used. */
|
||||
#define CCOLAMD_KNOBS 20
|
||||
|
||||
/* number of output statistics. Only stats [0..10] are currently used. */
|
||||
#define CCOLAMD_STATS 20
|
||||
|
||||
/* knobs [0] and stats [0]: dense row knob and output statistic. */
|
||||
#define CCOLAMD_DENSE_ROW 0
|
||||
|
||||
/* knobs [1] and stats [1]: dense column knob and output statistic. */
|
||||
#define CCOLAMD_DENSE_COL 1
|
||||
|
||||
/* knobs [2]: aggressive absorption option */
|
||||
#define CCOLAMD_AGGRESSIVE 2
|
||||
|
||||
/* knobs [3]: LU or Cholesky factorization option */
|
||||
#define CCOLAMD_LU 3
|
||||
|
||||
/* stats [2]: memory defragmentation count output statistic */
|
||||
#define CCOLAMD_DEFRAG_COUNT 2
|
||||
|
||||
/* stats [3]: ccolamd status: zero OK, > 0 warning or notice, < 0 error */
|
||||
#define CCOLAMD_STATUS 3
|
||||
|
||||
/* stats [4..6]: error info, or info on jumbled columns */
|
||||
#define CCOLAMD_INFO1 4
|
||||
#define CCOLAMD_INFO2 5
|
||||
#define CCOLAMD_INFO3 6
|
||||
|
||||
/* stats [7]: number of originally empty rows */
|
||||
#define CCOLAMD_EMPTY_ROW 7
|
||||
/* stats [8]: number of originally empty cols */
|
||||
#define CCOLAMD_EMPTY_COL 8
|
||||
/* stats [9]: number of rows with entries only in dense cols */
|
||||
#define CCOLAMD_NEWLY_EMPTY_ROW 9
|
||||
/* stats [10]: number of cols with entries only in dense rows */
|
||||
#define CCOLAMD_NEWLY_EMPTY_COL 10
|
||||
|
||||
/* error codes returned in stats [3]: */
|
||||
#define CCOLAMD_OK (0)
|
||||
#define CCOLAMD_OK_BUT_JUMBLED (1)
|
||||
#define CCOLAMD_ERROR_A_not_present (-1)
|
||||
#define CCOLAMD_ERROR_p_not_present (-2)
|
||||
#define CCOLAMD_ERROR_nrow_negative (-3)
|
||||
#define CCOLAMD_ERROR_ncol_negative (-4)
|
||||
#define CCOLAMD_ERROR_nnz_negative (-5)
|
||||
#define CCOLAMD_ERROR_p0_nonzero (-6)
|
||||
#define CCOLAMD_ERROR_A_too_small (-7)
|
||||
#define CCOLAMD_ERROR_col_length_negative (-8)
|
||||
#define CCOLAMD_ERROR_row_index_out_of_bounds (-9)
|
||||
#define CCOLAMD_ERROR_out_of_memory (-10)
|
||||
#define CCOLAMD_ERROR_invalid_cmember (-11)
|
||||
#define CCOLAMD_ERROR_internal_error (-999)
|
||||
|
||||
/* ========================================================================== */
|
||||
/* === Prototypes of user-callable routines ================================= */
|
||||
/* ========================================================================== */
|
||||
|
||||
/* define UF_long */
|
||||
#include "UFconfig.h"
|
||||
|
||||
size_t ccolamd_recommended /* returns recommended value of Alen, */
|
||||
/* or 0 if input arguments are erroneous */
|
||||
(
|
||||
int nnz, /* nonzeros in A */
|
||||
int n_row, /* number of rows in A */
|
||||
int n_col /* number of columns in A */
|
||||
) ;
|
||||
|
||||
size_t ccolamd_l_recommended /* returns recommended value of Alen, */
|
||||
/* or 0 if input arguments are erroneous */
|
||||
(
|
||||
UF_long nnz, /* nonzeros in A */
|
||||
UF_long n_row, /* number of rows in A */
|
||||
UF_long n_col /* number of columns in A */
|
||||
) ;
|
||||
|
||||
void ccolamd_set_defaults /* sets default parameters */
|
||||
( /* knobs argument is modified on output */
|
||||
double knobs [CCOLAMD_KNOBS] /* parameter settings for ccolamd */
|
||||
) ;
|
||||
|
||||
void ccolamd_l_set_defaults /* sets default parameters */
|
||||
( /* knobs argument is modified on output */
|
||||
double knobs [CCOLAMD_KNOBS] /* parameter settings for ccolamd */
|
||||
) ;
|
||||
|
||||
int ccolamd /* returns (1) if successful, (0) otherwise*/
|
||||
( /* A and p arguments are modified on output */
|
||||
int n_row, /* number of rows in A */
|
||||
int n_col, /* number of columns in A */
|
||||
int Alen, /* size of the array A */
|
||||
int A [ ], /* row indices of A, of size Alen */
|
||||
int p [ ], /* column pointers of A, of size n_col+1 */
|
||||
double knobs [CCOLAMD_KNOBS],/* parameter settings for ccolamd */
|
||||
int stats [CCOLAMD_STATS], /* ccolamd output statistics and error codes */
|
||||
int cmember [ ] /* Constraint set of A, of size n_col */
|
||||
) ;
|
||||
|
||||
UF_long ccolamd_l /* same as ccolamd, but with UF_long integers */
|
||||
(
|
||||
UF_long n_row,
|
||||
UF_long n_col,
|
||||
UF_long Alen,
|
||||
UF_long A [ ],
|
||||
UF_long p [ ],
|
||||
double knobs [CCOLAMD_KNOBS],
|
||||
UF_long stats [CCOLAMD_STATS],
|
||||
UF_long cmember [ ]
|
||||
) ;
|
||||
|
||||
int csymamd /* return (1) if OK, (0) otherwise */
|
||||
(
|
||||
int n, /* number of rows and columns of A */
|
||||
int A [ ], /* row indices of A */
|
||||
int p [ ], /* column pointers of A */
|
||||
int perm [ ], /* output permutation, size n_col+1 */
|
||||
double knobs [CCOLAMD_KNOBS],/* parameters (uses defaults if NULL) */
|
||||
int stats [CCOLAMD_STATS], /* output statistics and error codes */
|
||||
void * (*allocate) (size_t, size_t), /* pointer to calloc (ANSI C) or */
|
||||
/* mxCalloc (for MATLAB mexFunction) */
|
||||
void (*release) (void *), /* pointer to free (ANSI C) or */
|
||||
/* mxFree (for MATLAB mexFunction) */
|
||||
int cmember [ ], /* Constraint set of A */
|
||||
int stype /* 0: use both parts, >0: upper, <0: lower */
|
||||
) ;
|
||||
|
||||
UF_long csymamd_l /* same as csymamd, but with UF_long integers */
|
||||
(
|
||||
UF_long n,
|
||||
UF_long A [ ],
|
||||
UF_long p [ ],
|
||||
UF_long perm [ ],
|
||||
double knobs [CCOLAMD_KNOBS],
|
||||
UF_long stats [CCOLAMD_STATS],
|
||||
void * (*allocate) (size_t, size_t),
|
||||
void (*release) (void *),
|
||||
UF_long cmember [ ],
|
||||
UF_long stype
|
||||
) ;
|
||||
|
||||
void ccolamd_report
|
||||
(
|
||||
int stats [CCOLAMD_STATS]
|
||||
) ;
|
||||
|
||||
void ccolamd_l_report
|
||||
(
|
||||
UF_long stats [CCOLAMD_STATS]
|
||||
) ;
|
||||
|
||||
void csymamd_report
|
||||
(
|
||||
int stats [CCOLAMD_STATS]
|
||||
) ;
|
||||
|
||||
void csymamd_l_report
|
||||
(
|
||||
UF_long stats [CCOLAMD_STATS]
|
||||
) ;
|
||||
|
||||
|
||||
/* ========================================================================== */
|
||||
/* === Prototypes of "expert" routines ====================================== */
|
||||
/* ========================================================================== */
|
||||
|
||||
/* These routines are meant to be used internally, or in a future version of
|
||||
* UMFPACK. They appear here so that UMFPACK can use them, but they should not
|
||||
* be called directly by the user.
|
||||
*/
|
||||
|
||||
int ccolamd2
|
||||
( /* A and p arguments are modified on output */
|
||||
int n_row, /* number of rows in A */
|
||||
int n_col, /* number of columns in A */
|
||||
int Alen, /* size of the array A */
|
||||
int A [ ], /* row indices of A, of size Alen */
|
||||
int p [ ], /* column pointers of A, of size n_col+1 */
|
||||
double knobs [CCOLAMD_KNOBS],/* parameter settings for ccolamd */
|
||||
int stats [CCOLAMD_STATS], /* ccolamd output statistics and error codes */
|
||||
/* each Front_ array is of size n_col+1: */
|
||||
int Front_npivcol [ ], /* # pivot cols in each front */
|
||||
int Front_nrows [ ], /* # of rows in each front (incl. pivot rows) */
|
||||
int Front_ncols [ ], /* # of cols in each front (incl. pivot cols) */
|
||||
int Front_parent [ ], /* parent of each front */
|
||||
int Front_cols [ ], /* link list of pivot columns for each front */
|
||||
int *p_nfr, /* total number of frontal matrices */
|
||||
int InFront [ ], /* InFront [row] = f if row in front f */
|
||||
int cmember [ ] /* Constraint set of A */
|
||||
) ;
|
||||
|
||||
UF_long ccolamd2_l /* same as ccolamd2, but with UF_long integers */
|
||||
(
|
||||
UF_long n_row,
|
||||
UF_long n_col,
|
||||
UF_long Alen,
|
||||
UF_long A [ ],
|
||||
UF_long p [ ],
|
||||
double knobs [CCOLAMD_KNOBS],
|
||||
UF_long stats [CCOLAMD_STATS],
|
||||
UF_long Front_npivcol [ ],
|
||||
UF_long Front_nrows [ ],
|
||||
UF_long Front_ncols [ ],
|
||||
UF_long Front_parent [ ],
|
||||
UF_long Front_cols [ ],
|
||||
UF_long *p_nfr,
|
||||
UF_long InFront [ ],
|
||||
UF_long cmember [ ]
|
||||
) ;
|
||||
|
||||
void ccolamd_apply_order
|
||||
(
|
||||
int Front [ ],
|
||||
const int Order [ ],
|
||||
int Temp [ ],
|
||||
int nn,
|
||||
int nfr
|
||||
) ;
|
||||
|
||||
void ccolamd_l_apply_order
|
||||
(
|
||||
UF_long Front [ ],
|
||||
const UF_long Order [ ],
|
||||
UF_long Temp [ ],
|
||||
UF_long nn,
|
||||
UF_long nfr
|
||||
) ;
|
||||
|
||||
|
||||
void ccolamd_fsize
|
||||
(
|
||||
int nn,
|
||||
int MaxFsize [ ],
|
||||
int Fnrows [ ],
|
||||
int Fncols [ ],
|
||||
int Parent [ ],
|
||||
int Npiv [ ]
|
||||
) ;
|
||||
|
||||
void ccolamd_l_fsize
|
||||
(
|
||||
UF_long nn,
|
||||
UF_long MaxFsize [ ],
|
||||
UF_long Fnrows [ ],
|
||||
UF_long Fncols [ ],
|
||||
UF_long Parent [ ],
|
||||
UF_long Npiv [ ]
|
||||
) ;
|
||||
|
||||
void ccolamd_postorder
|
||||
(
|
||||
int nn,
|
||||
int Parent [ ],
|
||||
int Npiv [ ],
|
||||
int Fsize [ ],
|
||||
int Order [ ],
|
||||
int Child [ ],
|
||||
int Sibling [ ],
|
||||
int Stack [ ],
|
||||
int Front_cols [ ],
|
||||
int cmember [ ]
|
||||
) ;
|
||||
|
||||
void ccolamd_l_postorder
|
||||
(
|
||||
UF_long nn,
|
||||
UF_long Parent [ ],
|
||||
UF_long Npiv [ ],
|
||||
UF_long Fsize [ ],
|
||||
UF_long Order [ ],
|
||||
UF_long Child [ ],
|
||||
UF_long Sibling [ ],
|
||||
UF_long Stack [ ],
|
||||
UF_long Front_cols [ ],
|
||||
UF_long cmember [ ]
|
||||
) ;
|
||||
|
||||
int ccolamd_post_tree
|
||||
(
|
||||
int root,
|
||||
int k,
|
||||
int Child [ ],
|
||||
const int Sibling [ ],
|
||||
int Order [ ],
|
||||
int Stack [ ]
|
||||
) ;
|
||||
|
||||
UF_long ccolamd_l_post_tree
|
||||
(
|
||||
UF_long root,
|
||||
UF_long k,
|
||||
UF_long Child [ ],
|
||||
const UF_long Sibling [ ],
|
||||
UF_long Order [ ],
|
||||
UF_long Stack [ ]
|
||||
) ;
|
||||
|
||||
#ifndef EXTERN
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
EXTERN int (*ccolamd_printf) (const char *, ...) ;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -0,0 +1,25 @@
|
|||
/* ========================================================================== */
|
||||
/* === ccolamd_global.c ===================================================== */
|
||||
/* ========================================================================== */
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* CCOLAMD Copyright (C), Univ. of Florida. Authors: Timothy A. Davis,
|
||||
* Sivasankaran Rajamanickam, and Stefan Larimore
|
||||
* See License.txt for the Version 2.1 of the GNU Lesser General Public License
|
||||
* http://www.cise.ufl.edu/research/sparse
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
/* Global variables for CCOLAMD */
|
||||
|
||||
#ifndef NPRINT
|
||||
#ifdef MATLAB_MEX_FILE
|
||||
#include "mex.h"
|
||||
int (*ccolamd_printf) (const char *, ...) = mexPrintf ;
|
||||
#else
|
||||
#include <stdio.h>
|
||||
int (*ccolamd_printf) (const char *, ...) = printf ;
|
||||
#endif
|
||||
#else
|
||||
int (*ccolamd_printf) (const char *, ...) = ((void *) 0) ;
|
||||
#endif
|
||||
|
|
@ -15,6 +15,10 @@
|
|||
#include <stdexcept>
|
||||
#include <functional>
|
||||
|
||||
extern "C" {
|
||||
#include <colamd/colamd.h>
|
||||
}
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <boost/format.hpp>
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
#include <boost/numeric/ublas/io.hpp>
|
||||
#include <boost/assign/std/list.hpp> // for operator += in Ordering
|
||||
|
||||
#include <colamd/colamd.h>
|
||||
|
||||
#include "GaussianFactorGraph.h"
|
||||
#include "GaussianFactorSet.h"
|
||||
#include "FactorGraph-inl.h"
|
||||
|
|
Loading…
Reference in New Issue