Methods
-
staticSuperMap3D.TridiagonalSystemSolver.solve(diagonal, lower, upper, 右侧具有长度n的Cartesian坐标数组,是方程组的右侧。) → Array.<Cartesian3>
-
Solves a tridiagonal system of linear equations.
Performance:
Linear time.
Name Type Description diagonal
Array.<Number> 长度为 n
的数组,包含系数矩阵的对角线。lower
Array.<Number> 长度为 n - 1
的数组,包含系数矩阵的下对角线。upper
Array.<Number> 长度为 n - 1
的数组,包含系数矩阵的上对角线。右侧具有长度n的Cartesian坐标数组,是方程组的右侧。
Array.<Cartesian3> Returns:
An array of Cartesians with lengthn
that is the solution to the tridiagonal system of equations.Throws:
-
DeveloperError : 对角线和右侧的长度必须相同。
-
DeveloperError : 下部和上部必须有相同的长度。
-
DeveloperError : 下部和上部必须比对角线的长度少一。
Example:
var lowerDiagonal = [1.0, 1.0, 1.0, 1.0]; var diagonal = [2.0, 4.0, 4.0, 4.0, 2.0]; var upperDiagonal = [1.0, 1.0, 1.0, 1.0]; var rightHandSide = [ new SuperMap3D.Cartesian3(410757.0, -1595711.0, 1375302.0), new SuperMap3D.Cartesian3(-5986705.0, -2190640.0, 1099600.0), new SuperMap3D.Cartesian3(-12593180.0, 288588.0, -1755549.0), new SuperMap3D.Cartesian3(-5349898.0, 2457005.0, -2685438.0), new SuperMap3D.Cartesian3(845820.0, 1573488.0, -1205591.0) ]; var solution = SuperMap3D.TridiagonalSystemSolver.solve(lowerDiagonal, diagonal, upperDiagonal, rightHandSide);
-