//=========================================================================== // GoTools Core - SINTEF Geometry Tools Core library, version 2.0.1 // // Copyright (C) 2000-2007, 2010 SINTEF ICT, Applied Mathematics, Norway. // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation version 2 of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., // 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. // // Contact information: E-mail: tor.dokken@sintef.no // SINTEF ICT, Department of Applied Mathematics, // P.O. Box 124 Blindern, // 0314 Oslo, Norway. // // Other licenses are also available for this software, notably licenses // for: // - Building commercial software. // - Building software whose source code you wish to keep private. //=========================================================================== 00015 #ifndef _LUDECOMP_NEW_H 00016 #define _LUDECOMP_NEW_H 00017 00018 #include <vector> 00019 #include <stdexcept> 00020 00021 namespace Go 00022 { 00023 00032 //=========================================================================== 00033 template<typename SquareMatrix> 00034 void LUDecomp(SquareMatrix& mat, int num_rows, int* perm, bool& parity); 00035 //=========================================================================== 00036 00048 //=========================================================================== 00049 template<typename SquareMatrix, typename T> 00050 void LUsolveSystem(SquareMatrix& A, int num_unknowns, T* vec); 00051 //=========================================================================== 00052 00062 //=========================================================================== 00063 template<typename SquareMatrix, typename T> 00064 void forwardSubstitution(const SquareMatrix& L, T* x, int num_unknowns); 00065 //=========================================================================== 00066 00076 //=========================================================================== 00077 template<typename SquareMatrix, typename T> 00078 void backwardSubstitution(const SquareMatrix& U, T* x, int num_unknowns); 00079 //=========================================================================== 00080 00090 //=========================================================================== 00091 template<typename SquareMatrix> 00092 void forwardSubstitution(const SquareMatrix& L, std::vector<double>* x, int num_unknowns); 00093 //=========================================================================== 00094 00104 //=========================================================================== 00105 template<typename SquareMatrix> 00106 void backwardSubstitution(const SquareMatrix& U, std::vector<double>* x, int num_unknowns); 00107 //=========================================================================== 00108 00109 }; // end namespace Go 00110 00111 #include "GoTools/utils/LUDecomp_implementation.h" 00112 00113 #endif // _LUDECOMP_NEW_H 00114
Generated on Tue Sep 21 15:44:17 2010 for GoTools Core by  doxygen 1.6.3