## Class TridiagonalSolver

• java.lang.Object
• com.opengamma.strata.math.impl.linearalgebra.TridiagonalSolver

• public class TridiagonalSolver
extends Object
• ### Method Summary

All Methods
Modifier and Type Method Description
static double[] solvTriDag​(TridiagonalMatrix aM, double[] b)
Solves the system Ax = y for the unknown vector x, where A is a tridiagonal matrix and y is a vector.
static DoubleArray solvTriDag​(TridiagonalMatrix aM, DoubleArray b)
Solves the system Ax = y for the unknown vector x, where A is a tridiagonal matrix and y is a vector.
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Method Detail

• #### solvTriDag

public static double[] solvTriDag​(TridiagonalMatrix aM,
double[] b)
Solves the system Ax = y for the unknown vector x, where A is a tridiagonal matrix and y is a vector. This takes order n operations where n is the size of the system (number of linear equations), as opposed to order n^3 for the general problem.
Parameters:
aM - tridiagonal matrix
b - known vector (must be same length as rows/columns of matrix)
Returns:
vector (as an array of doubles) with same length as y
• #### solvTriDag

public static DoubleArray solvTriDag​(TridiagonalMatrix aM,
DoubleArray b)
Solves the system Ax = y for the unknown vector x, where A is a tridiagonal matrix and y is a vector. This takes order n operations where n is the size of the system (number of linear equations), as opposed to order n^3 for the general problem.
Parameters:
aM - tridiagonal matrix
b - known vector (must be same length as rows/columns of matrix)
Returns:
vector with same length as y