~ubuntu-branches/ubuntu/oneiric/suitesparse/oneiric

« back to all changes in this revision

Viewing changes to CSparse/Include/cs.h

  • Committer: Bazaar Package Importer
  • Author(s): Nick Ellery
  • Date: 2009-06-14 19:15:52 UTC
  • mfrom: (7.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090614191552-2hliya5q8n1quseu
Tags: 1:3.4.0-1ubuntu1
* Merge from debian unstable, remaining changes (LP: #387137):
  - debian/control:
    - demote libatlas-doc from recommends to suggests as it is not in main
    - drop recommends on doc-central as it is not in main

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
#ifdef MATLAB_MEX_FILE
8
8
#include "mex.h"
9
9
#endif
10
 
#define CS_VER 2                    /* CSparse Version 2.2.2 */
 
10
#define CS_VER 2                    /* CSparse Version 2.2.3 */
11
11
#define CS_SUBVER 2
12
 
#define CS_SUBSUB 2
13
 
#define CS_DATE "Sept 23, 2008"     /* CSparse release date */
14
 
#define CS_COPYRIGHT "Copyright (c) Timothy A. Davis, 2006-2008"
 
12
#define CS_SUBSUB 3
 
13
#define CS_DATE "Jan 20, 2009"     /* CSparse release date */
 
14
#define CS_COPYRIGHT "Copyright (c) Timothy A. Davis, 2006-2009"
15
15
 
16
16
/* --- primary CSparse routines and data structures ------------------------- */
17
17
typedef struct cs_sparse    /* matrix in compressed-column or triplet form */
18
18
{
19
 
    int nzmax ;     /* maximum number of entries */
20
 
    int m ;         /* number of rows */
21
 
    int n ;         /* number of columns */
22
 
    int *p ;        /* column pointers (size n+1) or col indices (size nzmax) */
23
 
    int *i ;        /* row indices, size nzmax */
24
 
    double *x ;     /* numerical values, size nzmax */
25
 
    int nz ;        /* # of entries in triplet matrix, -1 for compressed-col */
 
19
    int nzmax ;     /* maximum number of entries */
 
20
    int m ;         /* number of rows */
 
21
    int n ;         /* number of columns */
 
22
    int *p ;        /* column pointers (size n+1) or col indices (size nzmax) */
 
23
    int *i ;        /* row indices, size nzmax */
 
24
    double *x ;     /* numerical values, size nzmax */
 
25
    int nz ;        /* # of entries in triplet matrix, -1 for compressed-col */
26
26
} cs ;
27
27
 
28
28
cs *cs_add (const cs *A, const cs *B, double alpha, double beta) ;
50
50
/* --- secondary CSparse routines and data structures ----------------------- */
51
51
typedef struct cs_symbolic  /* symbolic Cholesky, LU, or QR analysis */
52
52
{
53
 
    int *pinv ;     /* inverse row perm. for QR, fill red. perm for Chol */
54
 
    int *q ;        /* fill-reducing column permutation for LU and QR */
 
53
    int *pinv ;     /* inverse row perm. for QR, fill red. perm for Chol */
 
54
    int *q ;        /* fill-reducing column permutation for LU and QR */
55
55
    int *parent ;   /* elimination tree for Cholesky and QR */
56
 
    int *cp ;       /* column pointers for Cholesky, row counts for QR */
 
56
    int *cp ;       /* column pointers for Cholesky, row counts for QR */
57
57
    int *leftmost ; /* leftmost[i] = min(find(A(i,:))), for QR */
58
 
    int m2 ;        /* # of rows for QR, after adding fictitious rows */
 
58
    int m2 ;        /* # of rows for QR, after adding fictitious rows */
59
59
    double lnz ;    /* # entries in L for LU or Cholesky; in V for QR */
60
60
    double unz ;    /* # entries in U for LU; in R for QR */
61
61
} css ;
62
62
 
63
63
typedef struct cs_numeric   /* numeric Cholesky, LU, or QR factorization */
64
64
{
65
 
    cs *L ;         /* L for LU and Cholesky, V for QR */
66
 
    cs *U ;         /* U for LU, R for QR, not used for Cholesky */
67
 
    int *pinv ;     /* partial pivoting for LU */
68
 
    double *B ;     /* beta [0..n-1] for QR */
 
65
    cs *L ;         /* L for LU and Cholesky, V for QR */
 
66
    cs *U ;         /* U for LU, R for QR, not used for Cholesky */
 
67
    int *pinv ;     /* partial pivoting for LU */
 
68
    double *B ;     /* beta [0..n-1] for QR */
69
69
} csn ;
70
70
 
71
71
typedef struct cs_dmperm_results    /* cs_dmperm or cs_scc output */
72
72
{
73
 
    int *p ;        /* size m, row permutation */
74
 
    int *q ;        /* size n, column permutation */
75
 
    int *r ;        /* size nb+1, block k is rows r[k] to r[k+1]-1 in A(p,q) */
76
 
    int *s ;        /* size nb+1, block k is cols s[k] to s[k+1]-1 in A(p,q) */
77
 
    int nb ;        /* # of blocks in fine dmperm decomposition */
 
73
    int *p ;        /* size m, row permutation */
 
74
    int *q ;        /* size n, column permutation */
 
75
    int *r ;        /* size nb+1, block k is rows r[k] to r[k+1]-1 in A(p,q) */
 
76
    int *s ;        /* size nb+1, block k is cols s[k] to s[k+1]-1 in A(p,q) */
 
77
    int nb ;        /* # of blocks in fine dmperm decomposition */
78
78
    int rr [5] ;    /* coarse row decomposition */
79
79
    int cc [5] ;    /* coarse column decomposition */
80
80
} csd ;