Revision 1654 trunk/src/sparse/hs.h
hs.h (revision 1654)  

2  2 
* $Id$ 
3  3 
* 
4  4 
* Author: David Fournier 
5 
* Copyright (c) 20082012 Regents of the University of California


6 
*


5 
* Copyright (c) 20082012 Regents of the University of California 

6 
* 

7  7 
* ADModelbuilder and associated libraries and documentations are 
8  8 
* provided under the general terms of the "BSD" license. 
9 
*


9 
* 

10  10 
* License: 
11 
*


11 
* 

12  12 
* Redistribution and use in source and binary forms, with or without 
13  13 
* modification, are permitted provided that the following conditions are 
14  14 
* met: 
15 
*


15 
* 

16  16 
* 1. Redistributions of source code must retain the above copyright 
17  17 
* notice, this list of conditions and the following disclaimer. 
18 
*


18 
* 

19  19 
* 2. Redistributions in binary form must reproduce the above copyright 
20  20 
* notice, this list of conditions and the following disclaimer in the 
21  21 
* documentation and/or other materials provided with the distribution. 
22 
*


22 
* 

23  23 
* 3. Neither the name of the University of California, Otter Research, 
24  24 
* nor the ADMB Foundation nor the names of its contributors may be used 
25  25 
* to endorse or promote products derived from this software without 
26  26 
* specific prior written permission. 
27 
*


27 
* 

28  28 
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
29  29 
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
30  30 
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
...  ...  
39  39 
* 
40  40 
*/ 
41  41 
#if !defined(__HS_H__) 
42 
#define __HS_H__


43 
extern "C"


42 
#define __HS_H__ 

43 
extern "C" 

44  44 
{ 
45  45 
#include "cs.h" 
46  46 
} 
47  47 
class dcompressed_triplet; 
48  48 
class dvar_compressed_triplet; 
49  49  
50 
//class hs_symbolic // Info for symbolic cholesky


50 
//class hs_symbolic // Info for symbolic cholesky 

51  51 
//{ 
52  52 
// public: 
53  53 
// 
54 
// int n ; // Dimension of underlying pos. def. matrix


55 
// ivector pinv ; // inverse row perm. for QR, fill red. perm for Chol


56 
// ivector parent ; // elimination tree for Cholesky and QR


57 
// ivector cp ; // column pointers for Cholesky, row counts for QR


58 
// double lnz ; // # entries in L for LU or Cholesky; in V for QR


54 
// int n ; // Dimension of underlying pos. def. matrix 

55 
// ivector pinv ; // inverse row perm. for QR, fill red. perm for Chol


56 
// ivector parent ; // elimination tree for Cholesky and QR


57 
// ivector cp ; // column pointers for Cholesky, row counts for QR


58 
// double lnz ; // # entries in L for LU or Cholesky; in V for QR


59  59 
// 
60 
// hs_symbolic(int, XCONST css *);


60 
// hs_symbolic(int, XCONST css *); 

61  61 
// hs_symbolic(int n, XCONST dmatrix &T, int order); 
62  62 
// hs_symbolic(XCONST dcompressed_triplet &T, int order); 
63  63 
// hs_symbolic(XCONST dvar_compressed_triplet &T, int order); 
64 
// int is_null();


64 
// int is_null(); 

65  65 
// int cmp(hs_symbolic &S); 
66  66 
// hs_symbolic(void); 
67  67 
//}; 
68  68  
69 
class hs_smatrix // matrix in compressedcolumn, 0 offset


69 
class hs_smatrix // matrix in compressedcolumn, 0 offset 

70  70 
{ 
71  71 
public: 
72  72  
73 
int nzmax ; // maximum number of entries; in practice nzmax= # nonzero


74 
int m ; // number of rows


75 
int n ; // number of columns; m=n for symmetric matrix


76 
ivector p ; // column pointers (size n+1) or col indices; size nzmax


77 
ivector i ; // row indices, size nzmax


78 
dvector x ; // numerical values, size nzmax


73 
int nzmax ; // maximum number of entries; in practice nzmax= # nonzero 

74 
int m ; // number of rows


75 
int n ; // number of columns; m=n for symmetric matrix


76 
ivector p ; // column pointers (size n+1) or col indices; size nzmax


77 
ivector i ; // row indices, size nzmax


78 
dvector x ; // numerical values, size nzmax


79  79 
hs_symbolic sym; 
Also available in: Unified diff