![]() |
GeneralBrokenLines V03-01-02
gblpy3
|
(Symmetric) Bordered Band Matrix. More...
Public Member Functions | |
| def | __init__ (self, nSize, nBorder=1, nBand=7) |
| Create new BBmatrix. More... | |
| def | addBlockMatrix (self, aIndex, aMatrix) |
| Add (compressed) block to BBmatrix: More... | |
| def | getBlockMatrix (self, aIndex) |
| Retrieve (compressed) block from BBmatrix: More... | |
| def | printMatrix (self) |
| Print BBmatrix. More... | |
| def | solveAndInvertBorderedBand (self, aRightHandSide) |
| Solve linear equation A*x=b system with BBmatrix A, calculate BB part of inverse of A. More... | |
Private Attributes | |
| __numSize | |
| size of matrix; int More... | |
| __numBorder | |
| size of border; int More... | |
| __numBand | |
| size of border; int More... | |
| __numCol | |
| size of band part of matrix; int More... | |
| __border | |
| border part B; matrix(float) More... | |
| __mixed | |
| mixed part M; matrix(float) More... | |
| __band | |
| band part C; matrix(float) More... | |
(Symmetric) Bordered Band Matrix.
Separate storage of border, mixed and band parts.
Example for matrix size=8 with border size and band width of two:
+- -+
| B11 B12 M13 M14 M15 M16 M17 M18 |
| B12 B22 M23 M24 M25 M26 M27 M28 |
| M13 M23 C33 C34 C35 0. 0. 0. |
| M14 M24 C34 C44 C45 C46 0. 0. |
| M15 M25 C35 C45 C55 C56 C57 0. |
| M16 M26 0. C46 C56 C66 C67 C68 |
| M17 M27 0. 0. C57 C67 C77 C78 |
| M18 M28 0. 0. 0. C68 C78 C88 |
+- -+
Is stored as:
+- -+ +- -+
| B11 B12 | | M13 M14 M15 M16 M17 M18 |
| B12 B22 | | M23 M24 M25 M26 M27 M28 |
+- -+ +- -+
+- -+
| C33 C44 C55 C66 C77 C88 |
| C34 C45 C56 C67 C78 0. |
| C35 C46 C57 C68 0. 0. |
+- -+
| def gblpy3.gblnum.BorderedBandMatrix.__init__ | ( | self, | |
| nSize, | |||
nBorder = 1, |
|||
nBand = 7 |
|||
| ) |
| def gblpy3.gblnum.BorderedBandMatrix.addBlockMatrix | ( | self, | |
| aIndex, | |||
| aMatrix | |||
| ) |
Add (compressed) block to BBmatrix:
BBmatrix(aIndex(i),aIndex(j)) += aMatrix(i,j)
| aIndex | list of indices; list(int) |
| aMatrix | (compressed) matrix; matrix(float) |
Definition at line 98 of file gblnum.py.
References gblpy3.gblnum.BorderedBandMatrix.__band, gblpy3.gblnum.BorderedBandMatrix.__border, gblpy3.gblnum.BorderedBandMatrix.__mixed, gblpy3.gblnum.BorderedBandMatrix.__numBand, and gblpy3.gblnum.BorderedBandMatrix.__numBorder.
| def gblpy3.gblnum.BorderedBandMatrix.getBlockMatrix | ( | self, | |
| aIndex | |||
| ) |
Retrieve (compressed) block from BBmatrix:
aMatrix(i,j) = BBmatrix(aIndex(i),aIndex(j))
| aIndex | list of indices; list(int) |
Definition at line 124 of file gblnum.py.
References gblpy3.gblnum.BorderedBandMatrix.__band, gblpy3.gblnum.BorderedBandMatrix.__border, gblpy3.gblnum.BorderedBandMatrix.__mixed, gblpy3.gblnum.BorderedBandMatrix.__numBand, and gblpy3.gblnum.BorderedBandMatrix.__numBorder.
| def gblpy3.gblnum.BorderedBandMatrix.printMatrix | ( | self | ) |
Print BBmatrix.
Definition at line 150 of file gblnum.py.
References gblpy3.gblnum.BorderedBandMatrix.__band, gblpy3.gblnum.BorderedBandMatrix.__border, gblpy3.gblnum.BorderedBandMatrix.__mixed, gblpy3.gblnum.BorderedBandMatrix.__numBand, and gblpy3.gblnum.BorderedBandMatrix.__numBorder.
| def gblpy3.gblnum.BorderedBandMatrix.solveAndInvertBorderedBand | ( | self, | |
| aRightHandSide | |||
| ) |
Solve linear equation A*x=b system with BBmatrix A, calculate BB part of inverse of A.
| aRightHandSide | right hand side 'b' of linear equation system; vector(float) |
| ZeroDivisionError | Band matrix is not positive definite |
|
private |
band part C; matrix(float)
Definition at line 88 of file gblnum.py.
Referenced by gblpy3.gblnum.BorderedBandMatrix.addBlockMatrix(), gblpy3.gblnum.BorderedBandMatrix.getBlockMatrix(), and gblpy3.gblnum.BorderedBandMatrix.printMatrix().
|
private |
border part B; matrix(float)
Definition at line 84 of file gblnum.py.
Referenced by gblpy3.gblnum.BorderedBandMatrix.addBlockMatrix(), gblpy3.gblnum.BorderedBandMatrix.getBlockMatrix(), and gblpy3.gblnum.BorderedBandMatrix.printMatrix().
|
private |
mixed part M; matrix(float)
Definition at line 86 of file gblnum.py.
Referenced by gblpy3.gblnum.BorderedBandMatrix.addBlockMatrix(), gblpy3.gblnum.BorderedBandMatrix.getBlockMatrix(), and gblpy3.gblnum.BorderedBandMatrix.printMatrix().
|
private |
size of border; int
Definition at line 80 of file gblnum.py.
Referenced by gblpy3.gblnum.BorderedBandMatrix.addBlockMatrix(), gblpy3.gblnum.BorderedBandMatrix.getBlockMatrix(), and gblpy3.gblnum.BorderedBandMatrix.printMatrix().
|
private |
size of border; int
Definition at line 78 of file gblnum.py.
Referenced by gblpy3.gblnum.BorderedBandMatrix.addBlockMatrix(), gblpy3.gblnum.BorderedBandMatrix.getBlockMatrix(), and gblpy3.gblnum.BorderedBandMatrix.printMatrix().
|
private |
|
private |