public class BorderedBandMatrix extends Object
Modifier and Type | Field and Description |
---|---|
private int |
numBand |
private int |
numBorder |
private int |
numCol |
private int |
numSize |
private VMatrix |
theBand |
private VSymMatrix |
theBorder |
private VMatrix |
theMixed |
Constructor and Description |
---|
BorderedBandMatrix() |
Modifier and Type | Method and Description |
---|---|
void |
addBlockMatrix(double aWeight,
int[] anIndex,
double[] aVector)
Add (extended) block matrix defined by 'aVector * aWeight * aVector.T' to
bordered band matrix:
BBmatrix(anIndex(i),anIndex(j)) += aVector(i) * aWeight * aVector(j).
|
private VMatrix |
bandOfAVAT(VMatrix anArray,
VSymMatrix aSymArray)
\return Band part of product
|
private void |
decomposeBand()
Decompose band matrix into diagonal matrix D and lower triangular band
matrix L (diagonal=1).
|
SymMatrix |
getBlockMatrix(List<Integer> anIndex)
Get (compressed) block from bordered band matrix: aMatrix(i,j) =
BBmatrix(anIndex(i),anIndex(j)).
|
private VMatrix |
invertBand()
\return Inverted band
|
void |
printMatrix() |
void |
resize(int nSize,
int nBorder,
int nBand)
\param nSize [in] Size of matrix \param nBorder [in] Size of border (=1
for q/p + additional local parameters)
\param nBand [in] Band width (usually = 5, for simplified jacobians = 4)
|
void |
solveAndInvertBorderedBand(VVector aRightHandSide,
VVector aSolution)
Solve linear equation A*x=b system with bordered band matrix A, calculate
bordered band part of inverse of A.
|
private VMatrix |
solveBand(VMatrix aRightHandSide)
Solve C*X=B for mixed part using decomposition C=LDL^T and forward and
backward substitution.
|
private VVector |
solveBand(VVector aRightHandSide)
Solve C*x=b for band part using decomposition C=LDL^T and forward (L*z=b)
and backward substitution
(L^T*x=D^-1*z).
|
private int numSize
private int numBorder
private int numBand
private int numCol
private VSymMatrix theBorder
private VMatrix theMixed
private VMatrix theBand
public void resize(int nSize, int nBorder, int nBand)
public void addBlockMatrix(double aWeight, int[] anIndex, double[] aVector)
public SymMatrix getBlockMatrix(List<Integer> anIndex)
public void solveAndInvertBorderedBand(VVector aRightHandSide, VVector aSolution)
public void printMatrix()
private void decomposeBand()
private VMatrix invertBand()
private VVector solveBand(VVector aRightHandSide)
private VMatrix solveBand(VMatrix aRightHandSide)
private VMatrix bandOfAVAT(VMatrix anArray, VSymMatrix aSymArray)
Copyright © 2019. All rights reserved.