Package org.drip.numerical.linearsolver
Class ShermanMorrisonScheme
java.lang.Object
org.drip.numerical.linearsolver.TridiagonalScheme
org.drip.numerical.linearsolver.PeriodicTridiagonalScheme
org.drip.numerical.linearsolver.ShermanMorrisonScheme
public class ShermanMorrisonScheme extends PeriodicTridiagonalScheme
ShermanMorrisonScheme implements the O(n) solver for a Tridiagonal Matrix with Periodic Boundary
Conditions. The References are:
- Batista, M., and A. R. A. Ibrahim-Karawia (2009): The use of Sherman-Morrison-Woodbury formula to solve cyclic block tridiagonal and cyclic block penta-diagonal linear systems of equations Applied Mathematics of Computation 210 (2) 558-563
- Datta, B. N. (2010): Numerical Linear Algebra and Applications 2nd Edition SIAM Philadelphia, PA
- Gallopoulos, E., B. Phillippe, and A. H. Sameh (2016): Parallelism in Matrix Computations Spring Berlin, Germany
- Ryaben’kii, V. S., and S. V. Tsynkov (2006): Theoretical Introduction to Numerical Analysis Wolters Kluwer Aalphen aan den Rijn, Netherlands
- Wikipedia (2024): Tridiagonal Matrix Algorithm https://en.wikipedia.org/wiki/Tridiagonal_matrix_algorithm
- Module = Computational Core Module
- Library = Numerical Analysis Library
- Project = Numerical Quadrature, Differentiation, Eigenization, Linear Algebra, and Utilities
- Package = Linear Algebra Matrix Transform Library
- Author:
- Lakshmi Krishnamurthy
-
Field Summary
Fields Modifier and Type Field Description static double
BATISTA_KARAWIA_DEFAULT_GAMMA
Batistia-Karawia Default Gamma -
Method Summary
Modifier and Type Method Description double[][]
batistaKarawiaMatrix()
Construct a Batista-Karawia Modification to the Periodic Tridiagonal Matrixdouble
gamma()
Retrieve the Gammadouble[]
qSolutionArray()
Compute the Q Solution Arraydouble[]
qySolver()
Compute the Solution Array based on Q/Y Schemedouble[]
solve()
Solve the Periodic Tridiagonal System given the RHSstatic ShermanMorrisonScheme
Standard(double[][] r2Array, double[] rhsArray)
Construct a Standard Gamma Instance of Sherman Morrison Solverstatic ShermanMorrisonScheme
StandardBatistaKarawia(double[][] r2Array, double[] rhsArray)
Construct a Standard Batista-Karawia Instance of Sherman Morrison Solverdouble[]
uRHSArray()
Construct a Batista-Karawia U RHS Arraydouble[]
vArray()
Construct a Batista-Karawia V Arraydouble[]
ySolutionArray()
Compute the Y Solution ArrayMethods inherited from class org.drip.numerical.linearsolver.TridiagonalScheme
matrix, rhsArray
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
BATISTA_KARAWIA_DEFAULT_GAMMA
public static final double BATISTA_KARAWIA_DEFAULT_GAMMABatistia-Karawia Default Gamma- See Also:
- Constant Field Values
-
-
Method Details
-
Standard
Construct a Standard Gamma Instance of Sherman Morrison Solver- Parameters:
r2Array
- R2 ArrayrhsArray
- RHS Array- Returns:
- Standard Gamma Instance of Sherman Morrison Solver
-
StandardBatistaKarawia
public static final ShermanMorrisonScheme StandardBatistaKarawia(double[][] r2Array, double[] rhsArray)Construct a Standard Batista-Karawia Instance of Sherman Morrison Solver- Parameters:
r2Array
- R2 ArrayrhsArray
- RHS Array- Returns:
- Standard Batista-Karawia Instance of Sherman Morrison Solver
-
gamma
public double gamma()Retrieve the Gamma- Returns:
- Gamma
-
batistaKarawiaMatrix
public double[][] batistaKarawiaMatrix()Construct a Batista-Karawia Modification to the Periodic Tridiagonal Matrix- Returns:
- Batista-Karawia Modification to the Periodic Tridiagonal Matrix
-
uRHSArray
public double[] uRHSArray()Construct a Batista-Karawia U RHS Array- Returns:
- Batista-Karawia U RHS Array
-
qSolutionArray
public double[] qSolutionArray()Compute the Q Solution Array- Returns:
- Q Solution Array
-
ySolutionArray
public double[] ySolutionArray()Compute the Y Solution Array- Returns:
- Y Solution Array
-
vArray
public double[] vArray()Construct a Batista-Karawia V Array- Returns:
- Batista-Karawia V Array
-
qySolver
public double[] qySolver()Compute the Solution Array based on Q/Y Scheme- Returns:
- Solution Array
-
solve
public double[] solve()Solve the Periodic Tridiagonal System given the RHS- Specified by:
solve
in classTridiagonalScheme
- Returns:
- The Solution
-