Revision 1654 trunk/src/sparse/cs.h

cs.h (revision 1654)
17 17
#ifdef MATLAB_MEX_FILE
18 18
#include "mex.h"
19 19
#endif
20
#define CS_VER 2		    /* CSparse Version 2.2.0 */
20
#define CS_VER 2                    /* CSparse Version 2.2.0 */
21 21
#define CS_SUBVER 2
22 22
#define CS_SUBSUB 0
23
#define CS_DATE "May 31, 2007"	    /* CSparse release date */
23
#define CS_DATE "May 31, 2007"      /* CSparse release date */
24 24
#define CS_COPYRIGHT "Copyright (c) Timothy A. Davis, 2006-2007"
25 25

  
26 26
/* --- primary CSparse routines and data structures ------------------------- */
27 27
typedef struct cs_sparse    /* matrix in compressed-column or triplet form */
28 28
{
29
    int nzmax ;	    /* maximum number of entries */
30
    int m ;	    /* number of rows */
31
    int n ;	    /* number of columns */
32
    int *p ;	    /* column pointers (size n+1) or col indices (size nzmax) */
33
    int *i ;	    /* row indices, size nzmax */
34
    double *x ;	    /* numerical values, size nzmax */
35
    int nz ;	    /* # of entries in triplet matrix, -1 for compressed-col */
29
    int nzmax ;     /* maximum number of entries */
30
    int m ;         /* number of rows */
31
    int n ;         /* number of columns */
32
    int *p ;        /* column pointers (size n+1) or col indices (size nzmax) */
33
    int *i ;        /* row indices, size nzmax */
34
    double *x ;     /* numerical values, size nzmax */
35
    int nz ;        /* # of entries in triplet matrix, -1 for compressed-col */
36 36
} cs ;
37 37

  
38 38
cs *cs_add (const cs *A, const cs *B, double alpha, double beta) ;
......
60 60
/* --- secondary CSparse routines and data structures ----------------------- */
61 61
typedef struct cs_symbolic  /* symbolic Cholesky, LU, or QR analysis */
62 62
{
63
    int *pinv ;	    /* inverse row perm. for QR, fill red. perm for Chol */
64
    int *q ;	    /* fill-reducing column permutation for LU and QR */
63
    int *pinv ;     /* inverse row perm. for QR, fill red. perm for Chol */
64
    int *q ;        /* fill-reducing column permutation for LU and QR */
65 65
    int *parent ;   /* elimination tree for Cholesky and QR */
66
    int *cp ;	    /* column pointers for Cholesky, row counts for QR */
66
    int *cp ;       /* column pointers for Cholesky, row counts for QR */
67 67
    int *leftmost ; /* leftmost[i] = min(find(A(i,:))), for QR */
68
    int m2 ;	    /* # of rows for QR, after adding fictitious rows */
68
    int m2 ;        /* # of rows for QR, after adding fictitious rows */
69 69
    double lnz ;    /* # entries in L for LU or Cholesky; in V for QR */
70 70
    double unz ;    /* # entries in U for LU; in R for QR */
71 71
} css ;
72 72

  
73 73
typedef struct cs_numeric   /* numeric Cholesky, LU, or QR factorization */
74 74
{
75
    cs *L ;	    /* L for LU and Cholesky, V for QR */
76
    cs *U ;	    /* U for LU, R for QR, not used for Cholesky */
77
    int *pinv ;	    /* partial pivoting for LU */
78
    double *B ;	    /* beta [0..n-1] for QR */
75
    cs *L ;         /* L for LU and Cholesky, V for QR */
76
    cs *U ;         /* U for LU, R for QR, not used for Cholesky */
77
    int *pinv ;     /* partial pivoting for LU */
78
    double *B ;     /* beta [0..n-1] for QR */
79 79
} csn ;
80 80

  
81 81
typedef struct cs_dmperm_results    /* cs_dmperm or cs_scc output */
82 82
{
83
    int *p ;	    /* size m, row permutation */
84
    int *q ;	    /* size n, column permutation */
85
    int *r ;	    /* size nb+1, block k is rows r[k] to r[k+1]-1 in A(p,q) */
86
    int *s ;	    /* size nb+1, block k is cols s[k] to s[k+1]-1 in A(p,q) */
87
    int nb ;	    /* # of blocks in fine dmperm decomposition */
83
    int *p ;        /* size m, row permutation */
84
    int *q ;        /* size n, column permutation */
85
    int *r ;        /* size nb+1, block k is rows r[k] to r[k+1]-1 in A(p,q) */
86
    int *s ;        /* size nb+1, block k is cols s[k] to s[k+1]-1 in A(p,q) */
87
    int nb ;        /* # of blocks in fine dmperm decomposition */
88 88
    int rr [5] ;    /* coarse row decomposition */
89 89
    int cc [5] ;    /* coarse column decomposition */
90 90
} csd ;

Also available in: Unified diff