COPASI API  4.16.103
CluX.h
Go to the documentation of this file.
2  \$Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/utilities/CluX.h,v \$
3  \$Revision: 1.15 \$
4  \$Name: \$
5  \$Author: shoops \$
6  \$Date: 2006/04/27 01:32:43 \$
8
10 // Properties, Inc. and EML Research, gGmbH.
12
13 #ifndef COPASI_CluX
14 #define COPASI_CluX
15
16 // Solve system of linear equations Ax = b.
17 //
18 // Typical usage:
19 //
20 // Matrix(double) A;
21 // Vector(unsigned C_INT32) ipiv;
22 // Vector(double) b;
23 //
24 // 1) LU_Factor(A,ipiv);
25 // 2) LU_Solve(A,ipiv,b);
26 //
27 // Now b has the solution x. Note that both A and b
28 // are overwritten. If these values need to be preserved,
29 // one can make temporary copies, as in
30 //
31 // O) Matrix(double) T = A;
32 // 1) LU_Factor(T,ipiv);
33 // 1a) Vector(double) x=b;
34 // 2) LU_Solve(T,ipiv,x);
35 //
36 // See details below.
37 //
38
39 // right-looking LU factorization algorithm (unblocked)
40 //
41 // Factors matrix A into lower and upper triangular matrices
42 // (L and U respectively) in solving the linear equation Ax=b.
43 //
44 //
45 // Args:
46 //
47 // A (input/output) Matrix(1:M, 1:N) In input, matrix to be
48 // factored. On output, overwritten with lower and
49 // upper triangular factors.
50 //
51 // row (output) Vector(1:M) Pivot vector. Describes how
52 // the rows of A were reordered to increase
53 // numerical stability.
54 //
55 // col (output) Vector(1:N) Pivot vector. Describes how
56 // the colums of A were reordered to avoid zero pivots.
57 //
58 // Return value:
59 //
60 // int (0 if successful, 1 otherwise)
61 //
62 //
63 class CProcessReport;
64 template < typename ValueType > class CMatrix;
65 template < typename ValueType > class CVector;
66
70  CProcessReport * cb = NULL);
71
72 #endif // COPASI_CluX
bool LUfactor(CMatrix< C_FLOAT64 > &A, CVector< unsigned C_INT32 > &row, CVector< unsigned C_INT32 > &col, CProcessReport *cb=NULL)