math.tdma

Classes


Public Protected Private

Global Functions

goog.math.tdma.solve(subDiagmainDiagsupDiagvecRightopt_result) !Array.<number>
Solves a linear system where the matrix is square tri-diagonal. That is, given a system of equations: A * result = vecRight, this class computes result = inv(A) * vecRight, where A has the special form of a tri-diagonal matrix: |dia(0) sup(0) 0 0 ... 0| |sub(0) dia(1) sup(1) 0 ... 0| A =| ... | |0 ... 0 sub(n-2) dia(n-1) sup(n-1)| |0 ... 0 0 sub(n-1) dia(n)|
Arguments:
subDiag : !Array.<number>
The sub diagonal of the matrix.
mainDiag : !Array.<number>
The main diagonal of the matrix.
supDiag : !Array.<number>
The super diagonal of the matrix.
vecRight : !Array.<number>
The right vector of the system of equations.
opt_result : Array.<number>>
The optional array to store the result.
Returns: !Array.<number>  The vector that is the solution to the system.
code »

Package math

Package Reference