COPASI API
4.16.103
Main Page
Namespaces
Classes
Files
File List
File Members
copasi
utilities
CluX.h
Go to the documentation of this file.
1
/* Begin CVS Header
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 $
7
End CVS Header */
8
9
// Copyright © 2005 by Pedro Mendes, Virginia Tech Intellectual
10
// Properties, Inc. and EML Research, gGmbH.
11
// All rights reserved.
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
67
bool
LUfactor
(
CMatrix< C_FLOAT64 >
& A,
68
CVector< unsigned C_INT32 >
& row,
69
CVector< unsigned C_INT32 >
& col,
70
CProcessReport
* cb = NULL);
71
72
#endif // COPASI_CluX
CMatrix
Definition:
CStepMatrix.h:21
LUfactor
bool LUfactor(CMatrix< C_FLOAT64 > &A, CVector< unsigned C_INT32 > &row, CVector< unsigned C_INT32 > &col, CProcessReport *cb=NULL)
CProcessReport
Definition:
CProcessReport.h:92
CVector
Definition:
COptMethod.h:41
Generated on Thu Jul 2 2015 14:50:18 for COPASI API by
1.8.6