三角システムを解く¶
If M
is a triangular matrix (upper or lower) and X
a vector containing the right hand side, the following procedures solve the system \(x \leftarrow M^{-1}x\). The vector X
contains the result:
gmm::upper_tri_solve(M, X, false) // Solving an upper triangular system
gmm::upper_tri_solve(M, X, true) // Solving an upper triangular system
// assuming there is 1 on the diagonal
gmm::lower_tri_solve(M, X, false) // Solving a lower triangular system
gmm::lower_tri_solve(M, X, true) // Solving a lower triangular system
// assuming there is 1 on the diagonal
対角の下にあるコンポーネントは gmm::upper_tri_solve
によって無視され,対角の上にあるコンポーネントは gmm::lower_tri_solve
によって無視されます.