GeneralBrokenLines  trunk_rev46
 All Classes Files Functions Variables Typedefs Pages
BorderedBandMatrix.h
Go to the documentation of this file.
1 /*
2  * BorderedBandMatrix.h
3  *
4  * Created on: Aug 14, 2011
5  * Author: kleinwrt
6  */
7 
8 #ifndef BORDEREDBANDMATRIX_H_
9 #define BORDEREDBANDMATRIX_H_
10 
11 #include<iostream>
12 #include<vector>
13 #include<math.h>
14 #include<cstdlib>
15 #include "TVectorD.h"
16 #include "TMatrixD.h"
17 #include "TMatrixDSym.h"
18 #include "VMatrix.h"
19 
21 
54 public:
56  virtual ~BorderedBandMatrix();
57  void resize(unsigned int nSize, unsigned int nBorder = 1,
58  unsigned int nBand = 5);
59  void solveAndInvertBorderedBand(const VVector &aRightHandSide,
60  VVector &aSolution);
61  void addBlockMatrix(double aWeight,
62  const std::vector<unsigned int>* anIndex,
63  const std::vector<double>* aVector);
64  TMatrixDSym getBlockMatrix(const std::vector<unsigned int> anIndex) const;
65  void printMatrix() const;
66 
67 private:
68  unsigned int numSize;
69  unsigned int numBorder;
70  unsigned int numBand;
71  unsigned int numCol;
75 
76  void decomposeBand();
77  VVector solveBand(const VVector &aRightHandSide) const;
78  VMatrix solveBand(const VMatrix &aRightHandSide) const;
80  VMatrix bandOfAVAT(const VMatrix &anArray,
81  const VSymMatrix &aSymArray) const;
82 };
83 
84 #endif /* BORDEREDBANDMATRIX_H_ */