GENFIT  Rev:NoNumberAvailable
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
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 "VMatrix.h"
12 
13 #include <iostream>
14 #include <vector>
15 #include <math.h>
16 #include <cstdlib>
17 #include <TVectorD.h>
18 #include <TMatrixD.h>
19 #include <TMatrixDSym.h>
20 
21 
23 namespace gbl {
24 
26 
59 public:
61  virtual ~BorderedBandMatrix();
62  void resize(unsigned int nSize, unsigned int nBorder = 1,
63  unsigned int nBand = 5);
64  void solveAndInvertBorderedBand(const VVector &aRightHandSide,
65  VVector &aSolution);
66  void addBlockMatrix(double aWeight,
67  const std::vector<unsigned int>* anIndex,
68  const std::vector<double>* aVector);
69  TMatrixDSym getBlockMatrix(const std::vector<unsigned int> anIndex) const;
70  void printMatrix() const;
71 
72 private:
73  unsigned int numSize;
74  unsigned int numBorder;
75  unsigned int numBand;
76  unsigned int numCol;
80 
81  void decomposeBand();
82  VVector solveBand(const VVector &aRightHandSide) const;
83  VMatrix solveBand(const VMatrix &aRightHandSide) const;
85  VMatrix bandOfAVAT(const VMatrix &anArray,
86  const VSymMatrix &aSymArray) const;
87 };
88 }
89 #endif /* BORDEREDBANDMATRIX_H_ */
(Symmetric) Bordered Band Matrix.
VVector solveBand(const VVector &aRightHandSide) const
Solve for band part.
VMatrix invertBand()
Invert band part.
TMatrixDSym getBlockMatrix(const std::vector< unsigned int > anIndex) const
Retrieve symmetric block matrix.
VMatrix theBand
Band part.
BorderedBandMatrix()
Create bordered band matrix.
VSymMatrix theBorder
Border part.
Simple Vector based on std::vector
Definition: VMatrix.h:22
unsigned int numBorder
Border size.
unsigned int numSize
Matrix size.
unsigned int numBand
Band width.
Namespace for the general broken lines package.
void addBlockMatrix(double aWeight, const std::vector< unsigned int > *anIndex, const std::vector< double > *aVector)
Add symmetric block matrix.
void printMatrix() const
Print bordered band matrix.
void resize(unsigned int nSize, unsigned int nBorder=1, unsigned int nBand=5)
Resize bordered band matrix.
VMatrix theMixed
Mixed part.
void solveAndInvertBorderedBand(const VVector &aRightHandSide, VVector &aSolution)
Solve linear equation system, partially calculate inverse.
VMatrix bandOfAVAT(const VMatrix &anArray, const VSymMatrix &aSymArray) const
Calculate band part of: 'anArray * aSymArray * anArray.T'.
void decomposeBand()
(root free) Cholesky decomposition of band part: C=LDL^T
unsigned int numCol
Band matrix size.
Simple Matrix based on std::vector
Definition: VMatrix.h:42
Simple symmetric Matrix based on std::vector
Definition: VMatrix.h:65