GeneralBrokenLines  V01-11-00
BorderedBandMatrix.h
Go to the documentation of this file.
00001 /*
00002  * BorderedBandMatrix.h
00003  *
00004  *  Created on: Aug 14, 2011
00005  *      Author: kleinwrt
00006  */
00007 
00008 #ifndef BORDEREDBANDMATRIX_H_
00009 #define BORDEREDBANDMATRIX_H_
00010 
00011 #include<iostream>
00012 #include<vector>
00013 #include<math.h>
00014 #include "TVectorD.h"
00015 #include "TMatrixD.h"
00016 #include "TMatrixDSym.h"
00017 #include "VMatrix.h"
00018 
00020 
00052 class BorderedBandMatrix {
00053 public:
00054         BorderedBandMatrix();
00055         virtual ~BorderedBandMatrix();
00056         void resize(unsigned int nSize, unsigned int nBorder = 1,
00057                         unsigned int nBand = 5);
00058         void solveAndInvertBorderedBand(const VVector &aRightHandSide,
00059                         VVector &aSolution);
00060         void addBlockMatrix(double aWeight,
00061                         const std::vector<unsigned int>* anIndex,
00062                         const std::vector<double>* aVector);
00063         TMatrixDSym getBlockMatrix(std::vector<unsigned int> anIndex) const;
00064         void printMatrix() const;
00065 
00066 private:
00067         unsigned int numSize; 
00068         unsigned int numBorder; 
00069         unsigned int numBand; 
00070         unsigned int numCol; 
00071         VSymMatrix theBorder; 
00072         VMatrix theMixed; 
00073         VMatrix theBand; 
00074 
00075         void decomposeBand();
00076         VVector solveBand(const VVector &aRightHandSide) const;
00077         VMatrix solveBand(const VMatrix &aRightHandSide) const;
00078         VMatrix invertBand();
00079         VMatrix bandOfAVAT(const VMatrix &anArray,
00080                         const VSymMatrix &aSymArray) const;
00081 };
00082 
00083 #endif /* BORDEREDBANDMATRIX_H_ */
 All Classes Files Functions Variables Typedefs