KrisLibrary  1.0.0
backsubstitute.h
1 #ifndef MATH_BACK_SUBSTITUTE_H
2 #define MATH_BACK_SUBSTITUTE_H
3 
4 #include "MatrixTemplate.h"
5 
6 namespace Math {
7 
8 // If A is upper triangular nxn, solves Ax=b
9 template <class T>
10 bool UBackSubstitute(const MatrixTemplate<T>& a, const VectorTemplate<T>& b, VectorTemplate<T>& x);
11 
12 // If A is lower triangular nxn, solves Ax=b
13 template <class T>
14 bool LBackSubstitute(const MatrixTemplate<T>& a, const VectorTemplate<T>& b, VectorTemplate<T>& x);
15 
16 // If A is lower triangular nxn, solves A^t*x=b
17 template <class T>
18 bool LtBackSubstitute(const MatrixTemplate<T>& a, const VectorTemplate<T>& b, VectorTemplate<T>& x);
19 
20 // The following are identical to the above, but assume the diagonal of a is all ones
21 template <class T>
22 void U1BackSubstitute(const MatrixTemplate<T>& a, const VectorTemplate<T>& b, VectorTemplate<T>& x);
23 template <class T>
24 void L1BackSubstitute(const MatrixTemplate<T>& a, const VectorTemplate<T>& b, VectorTemplate<T>& x);
25 template <class T>
26 void Lt1BackSubstitute(const MatrixTemplate<T>& a, const VectorTemplate<T>& b, VectorTemplate<T>& x);
27 
28 
29 // The following perform the same operations as above but with x and b matrices
30 template <class T>
31 bool UBackSubstitute(const MatrixTemplate<T>& a, const MatrixTemplate<T>& b, MatrixTemplate<T>& x);
32 template <class T>
33 bool LBackSubstitute(const MatrixTemplate<T>& a, const MatrixTemplate<T>& b, MatrixTemplate<T>& x);
34 template <class T>
35 bool LtBackSubstitute(const MatrixTemplate<T>& a, const MatrixTemplate<T>& b, MatrixTemplate<T>& x);
36 template <class T>
37 void U1BackSubstitute(const MatrixTemplate<T>& a, const MatrixTemplate<T>& b, MatrixTemplate<T>& x);
38 template <class T>
39 void L1BackSubstitute(const MatrixTemplate<T>& a, const MatrixTemplate<T>& b, MatrixTemplate<T>& x);
40 template <class T>
41 void Lt1BackSubstitute(const MatrixTemplate<T>& a, const MatrixTemplate<T>& b, MatrixTemplate<T>& x);
42 
43 
44 } // namespace Math
45 
46 #endif
Contains all definitions in the Math package.
Definition: WorkspaceBound.h:12