/********************************************************************/ /* Copyright (c) 2017 System fugen G.K. and Yuzi Mizuno */ /* All rights reserved. */ /********************************************************************/ #ifndef _MGLINEAREQUATION_HH_ #define _MGLINEAREQUATION_HH_ /** @file */ /** @addtogroup ALGORITHM * @{ */ /// /// class MGMatrix; class MGBPointSeq; /** * @brief LU factorization to solve linear equations, general version. * This is a general solver using pivotting, and so is inefficient * compared with band matrix of diagonally dominant equations. * If the equation is known as special equations as band matrix * (as of diagonally dominant equations, or as Symetric Tridiagonal), * use factorizeBandLU and solveBandLU, factorizeCholeLU and solveCholeLU, * or solveSymetricTridiagonal. * * factorizeLU factorizes W to LU in the linear equation W*X=A. * Using output W, the solution of W*X=A is obtained by solveLU. * Here, L is n by n lower triangular matrix and U is n by n upper * triangular matrix. U's diagonal is (1). * LU factorization using pivot. */ void factorizeLU( MGMatrix& W,///