diff --git a/Eigen/SparseLU b/Eigen/SparseLU index dc532f87f..92e14de9d 100644 --- a/Eigen/SparseLU +++ b/Eigen/SparseLU @@ -1,9 +1,17 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// Copyright (C) 2012 Désiré Nuentsa-Wakam +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + #ifndef EIGEN_SPARSELU_MODULE_H #define EIGEN_SPARSELU_MODULE_H #include "SparseCore" - /** * \defgroup SparseLU_Module SparseLU module * @@ -14,6 +22,22 @@ #include "src/SparseLU/SparseLU_gemm_kernel.h" +#include "src/SparseLU/SparseLU_Structs.h" +#include "src/SparseLU/SparseLU_Matrix.h" +#include "src/SparseLU/SparseLUBase.h" +#include "src/SparseLU/SparseLU_Coletree.h" +#include "src/SparseLU/SparseLU_Memory.h" +#include "src/SparseLU/SparseLU_heap_relax_snode.h" +#include "src/SparseLU/SparseLU_relax_snode.h" +#include "src/SparseLU/SparseLU_pivotL.h" +#include "src/SparseLU/SparseLU_panel_dfs.h" +#include "src/SparseLU/SparseLU_kernel_bmod.h" +#include "src/SparseLU/SparseLU_panel_bmod.h" +#include "src/SparseLU/SparseLU_column_dfs.h" +#include "src/SparseLU/SparseLU_column_bmod.h" +#include "src/SparseLU/SparseLU_copy_to_ucol.h" +#include "src/SparseLU/SparseLU_pruneL.h" +#include "src/SparseLU/SparseLU_Utils.h" #include "src/SparseLU/SparseLU.h" #endif // EIGEN_SPARSELU_MODULE_H diff --git a/Eigen/src/SparseLU/SparseLU.h b/Eigen/src/SparseLU/SparseLU.h index 6003237fe..c644f945f 100644 --- a/Eigen/src/SparseLU/SparseLU.h +++ b/Eigen/src/SparseLU/SparseLU.h @@ -13,63 +13,57 @@ namespace Eigen { - -// Data structure needed by all routines -#include "SparseLU_Structs.h" -#include "SparseLU_Matrix.h" - -// Base structure containing all the factorization routines -#include "SparseLUBase.h" -/** - * \ingroup SparseLU_Module - * \brief Sparse supernodal LU factorization for general matrices - * - * This class implements the supernodal LU factorization for general matrices. - * It uses the main techniques from the sequential SuperLU package - * (http://crd-legacy.lbl.gov/~xiaoye/SuperLU/). It handles transparently real - * and complex arithmetics with single and double precision, depending on the - * scalar type of your input matrix. - * The code has been optimized to provide BLAS-3 operations during supernode-panel updates. - * It benefits directly from the built-in high-performant Eigen BLAS routines. - * Moreover, when the size of a supernode is very small, the BLAS calls are avoided to - * enable a better optimization from the compiler. For best performance, - * you should compile it with NDEBUG flag to avoid the numerous bounds checking on vectors. - * - * An important parameter of this class is the ordering method. It is used to reorder the columns - * (and eventually the rows) of the matrix to reduce the number of new elements that are created during - * numerical factorization. The cheapest method available is COLAMD. - * See \link OrderingMethods_Module the OrderingMethods module \endlink for the list of - * built-in and external ordering methods. - * - * Simple example with key steps - * \code - * VectorXd x(n), b(n); - * SparseMatrix A; - * SparseLU, COLAMDOrdering > solver; - * // fill A and b; - * // Compute the ordering permutation vector from the structural pattern of A - * solver.analyzePattern(A); - * // Compute the numerical factorization - * solver.factorize(A); - * //Use the factors to solve the linear system - * x = solver.solve(b); - * \endcode - * - * \warning The input matrix A should be in a \b compressed and \b column-major form. - * Otherwise an expensive copy will be made. You can call the inexpensive makeCompressed() to get a compressed matrix. - * - * \note Unlike the initial SuperLU implementation, there is no step to equilibrate the matrix. - * For badly scaled matrices, this step can be useful to reduce the pivoting during factorization. - * If this is the case for your matrices, you can try the basic scaling method at - * "unsupported/Eigen/src/IterativeSolvers/Scaling.h" - * - * \tparam _MatrixType The type of the sparse matrix. It must be a column-major SparseMatrix<> - * \tparam _OrderingType The ordering method to use, either AMD, COLAMD or METIS - * - * - * \sa \ref TutorialSparseDirectSolvers - * \sa \ref OrderingMethods_Module - */ +/** \ingroup SparseLU_Module + * \class SparseLU + * + * \brief Sparse supernodal LU factorization for general matrices + * + * This class implements the supernodal LU factorization for general matrices. + * It uses the main techniques from the sequential SuperLU package + * (http://crd-legacy.lbl.gov/~xiaoye/SuperLU/). It handles transparently real + * and complex arithmetics with single and double precision, depending on the + * scalar type of your input matrix. + * The code has been optimized to provide BLAS-3 operations during supernode-panel updates. + * It benefits directly from the built-in high-performant Eigen BLAS routines. + * Moreover, when the size of a supernode is very small, the BLAS calls are avoided to + * enable a better optimization from the compiler. For best performance, + * you should compile it with NDEBUG flag to avoid the numerous bounds checking on vectors. + * + * An important parameter of this class is the ordering method. It is used to reorder the columns + * (and eventually the rows) of the matrix to reduce the number of new elements that are created during + * numerical factorization. The cheapest method available is COLAMD. + * See \link OrderingMethods_Module the OrderingMethods module \endlink for the list of + * built-in and external ordering methods. + * + * Simple example with key steps + * \code + * VectorXd x(n), b(n); + * SparseMatrix A; + * SparseLU, COLAMDOrdering > solver; + * // fill A and b; + * // Compute the ordering permutation vector from the structural pattern of A + * solver.analyzePattern(A); + * // Compute the numerical factorization + * solver.factorize(A); + * //Use the factors to solve the linear system + * x = solver.solve(b); + * \endcode + * + * \warning The input matrix A should be in a \b compressed and \b column-major form. + * Otherwise an expensive copy will be made. You can call the inexpensive makeCompressed() to get a compressed matrix. + * + * \note Unlike the initial SuperLU implementation, there is no step to equilibrate the matrix. + * For badly scaled matrices, this step can be useful to reduce the pivoting during factorization. + * If this is the case for your matrices, you can try the basic scaling method at + * "unsupported/Eigen/src/IterativeSolvers/Scaling.h" + * + * \tparam _MatrixType The type of the sparse matrix. It must be a column-major SparseMatrix<> + * \tparam _OrderingType The ordering method to use, either AMD, COLAMD or METIS + * + * + * \sa \ref TutorialSparseDirectSolvers + * \sa \ref OrderingMethods_Module + */ template class SparseLU { @@ -548,7 +542,6 @@ void SparseLU::factorize(const MatrixType& matrix) m_factorizationIsOk = true; } -// #include "SparseLU_simplicialfactorize.h" namespace internal { template diff --git a/Eigen/src/SparseLU/SparseLUBase.h b/Eigen/src/SparseLU/SparseLUBase.h index 893728b5e..2c723c1cd 100644 --- a/Eigen/src/SparseLU/SparseLUBase.h +++ b/Eigen/src/SparseLU/SparseLUBase.h @@ -8,9 +8,13 @@ // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. #ifndef SPARSELUBASE_H #define SPARSELUBASE_H -/** - * Base class for sparseLU - */ + +namespace Eigen { + +/** \ingroup SparseLU_Module + * \class SparseLUBase + * Base class for sparseLU + */ template struct SparseLUBase { @@ -49,18 +53,6 @@ struct SparseLUBase }; -#include "SparseLU_Coletree.h" -#include "SparseLU_Memory.h" -#include "SparseLU_heap_relax_snode.h" -#include "SparseLU_relax_snode.h" -#include "SparseLU_pivotL.h" -#include "SparseLU_panel_dfs.h" -#include "SparseLU_kernel_bmod.h" -#include "SparseLU_panel_bmod.h" -#include "SparseLU_column_dfs.h" -#include "SparseLU_column_bmod.h" -#include "SparseLU_copy_to_ucol.h" -#include "SparseLU_pruneL.h" -#include "SparseLU_Utils.h" +} // end namespace Eigen #endif diff --git a/Eigen/src/SparseLU/SparseLU_Coletree.h b/Eigen/src/SparseLU/SparseLU_Coletree.h index e373525ad..2500079ae 100644 --- a/Eigen/src/SparseLU/SparseLU_Coletree.h +++ b/Eigen/src/SparseLU/SparseLU_Coletree.h @@ -31,7 +31,10 @@ #ifndef SPARSELU_COLETREE_H #define SPARSELU_COLETREE_H +namespace Eigen { + namespace internal { + /** Find the root of the tree/set containing the vertex i : Use Path halving */ template int etree_find (int i, IndexVector& pp) @@ -187,5 +190,8 @@ void treePostorder(int n, IndexVector& parent, IndexVector& post) internal::nr_etdfs(n, parent, first_kid, next_kid, post, postnum); } -} // internal -#endif \ No newline at end of file +} // end namespace internal + +} // end namespace Eigen + +#endif // SPARSELU_COLETREE_H diff --git a/Eigen/src/SparseLU/SparseLU_Matrix.h b/Eigen/src/SparseLU/SparseLU_Matrix.h index 3b0f4b77a..d5770e1ae 100644 --- a/Eigen/src/SparseLU/SparseLU_Matrix.h +++ b/Eigen/src/SparseLU/SparseLU_Matrix.h @@ -11,6 +11,8 @@ #ifndef EIGEN_SPARSELU_MATRIX_H #define EIGEN_SPARSELU_MATRIX_H +namespace Eigen { + /** \ingroup SparseLU_Module * \brief a class to manipulate the L supernodal factor from the SparseLU factorization * @@ -309,5 +311,6 @@ void SuperNodalMatrix::solveInPlace( MatrixBase&X) const } } +} // end namespace Eigen -#endif \ No newline at end of file +#endif // EIGEN_SPARSELU_MATRIX_H diff --git a/Eigen/src/SparseLU/SparseLU_Memory.h b/Eigen/src/SparseLU/SparseLU_Memory.h index 1a8cf5455..74cb348bf 100644 --- a/Eigen/src/SparseLU/SparseLU_Memory.h +++ b/Eigen/src/SparseLU/SparseLU_Memory.h @@ -31,6 +31,8 @@ #ifndef EIGEN_SPARSELU_MEMORY #define EIGEN_SPARSELU_MEMORY +namespace Eigen { + #define LU_NO_MARKER 3 #define LU_NUM_TEMPV(m,w,t,b) ((std::max)(m, (t+b)*w) ) #define IND_EMPTY (-1) @@ -198,7 +200,9 @@ int SparseLUBase::LUMemXpand(VectorType& vec, int& maxlen, int nbE if (failed_size) return failed_size; - return 0 ; - + return 0 ; } -#endif \ No newline at end of file + +} // end namespace Eigen + +#endif // EIGEN_SPARSELU_MEMORY diff --git a/Eigen/src/SparseLU/SparseLU_Structs.h b/Eigen/src/SparseLU/SparseLU_Structs.h index 7b3aa250c..89d6e81b7 100644 --- a/Eigen/src/SparseLU/SparseLU_Structs.h +++ b/Eigen/src/SparseLU/SparseLU_Structs.h @@ -65,10 +65,13 @@ * xusub[i] points to the starting location of column i in ucol. * Storage: new row subscripts; that is subscripts of PA. */ + #ifndef EIGEN_LU_STRUCTS #define EIGEN_LU_STRUCTS -typedef enum {LUSUP, UCOL, LSUB, USUB, LLVL, ULVL} LU_MemType; +namespace Eigen { + +typedef enum {LUSUP, UCOL, LSUB, USUB, LLVL, ULVL} LU_MemType; template struct LU_GlobalLU_t { @@ -100,4 +103,7 @@ struct LU_perfvalues { int colblk; // The minimum column dimension for 2-D blocking to be used; int fillfactor; // The estimated fills factors for L and U, compared with A }; -#endif \ No newline at end of file + +} // end namespace Eigen + +#endif // EIGEN_LU_STRUCTS diff --git a/Eigen/src/SparseLU/SparseLU_Utils.h b/Eigen/src/SparseLU/SparseLU_Utils.h index b13930dbb..e764823ae 100644 --- a/Eigen/src/SparseLU/SparseLU_Utils.h +++ b/Eigen/src/SparseLU/SparseLU_Utils.h @@ -11,6 +11,7 @@ #ifndef EIGEN_SPARSELU_UTILS_H #define EIGEN_SPARSELU_UTILS_H +namespace Eigen { /** * \brief Count Nonzero elements in the factors @@ -37,8 +38,8 @@ void SparseLUBase::LU_countnz(const int n, int& nnzL, int& nnzU, G jlen--; } } - } + /** * \brief Fix up the data storage lsub for L-subscripts. * @@ -72,4 +73,6 @@ void SparseLUBase::LU_fixupL(const int n, const IndexVector& perm_ glu.xlsub(n) = nextl; } -#endif +} // end namespace Eigen + +#endif // EIGEN_SPARSELU_UTILS_H diff --git a/Eigen/src/SparseLU/SparseLU_column_bmod.h b/Eigen/src/SparseLU/SparseLU_column_bmod.h index d3f7f82e9..6d557eb81 100644 --- a/Eigen/src/SparseLU/SparseLU_column_bmod.h +++ b/Eigen/src/SparseLU/SparseLU_column_bmod.h @@ -31,6 +31,8 @@ #ifndef SPARSELU_COLUMN_BMOD_H #define SPARSELU_COLUMN_BMOD_H +namespace Eigen { + /** * \brief Performs numeric block updates (sup-col) in topological order * @@ -170,4 +172,7 @@ int SparseLUBase::LU_column_bmod(const int jcol, const int nseg, B } // End if fst_col return 0; } -#endif \ No newline at end of file + +} // end namespace Eigen + +#endif // SPARSELU_COLUMN_BMOD_H diff --git a/Eigen/src/SparseLU/SparseLU_column_dfs.h b/Eigen/src/SparseLU/SparseLU_column_dfs.h index 7ca3e4755..1bf17330a 100644 --- a/Eigen/src/SparseLU/SparseLU_column_dfs.h +++ b/Eigen/src/SparseLU/SparseLU_column_dfs.h @@ -29,6 +29,38 @@ */ #ifndef SPARSELU_COLUMN_DFS_H #define SPARSELU_COLUMN_DFS_H + +namespace Eigen { + +namespace internal { + +template +struct LU_column_dfs_traits +{ + typedef typename IndexVector::Scalar Index; + typedef typename ScalarVector::Scalar Scalar; + LU_column_dfs_traits(Index jcol, Index& jsuper, LU_GlobalLU_t& glu) + : m_jcol(jcol), m_jsuper_ref(jsuper), m_glu(glu) + {} + bool update_segrep(Index /*krep*/, Index /*jj*/) + { + return true; + } + void mem_expand(IndexVector& lsub, int& nextl, int chmark) + { + if (nextl >= m_glu.nzlmax) + SparseLUBase::LUMemXpand(lsub, m_glu.nzlmax, nextl, LSUB, m_glu.num_expansions); + if (chmark != (m_jcol-1)) m_jsuper_ref = IND_EMPTY; + } + enum { ExpandMem = true }; + + int m_jcol; + int& m_jsuper_ref; + LU_GlobalLU_t& m_glu; +}; + +} // end namespace internal + /** * \brief Performs a symbolic factorization on column jcol and decide the supernode boundary * @@ -56,31 +88,6 @@ * > 0 number of bytes allocated when run out of space * */ -template -struct LU_column_dfs_traits -{ - typedef typename IndexVector::Scalar Index; - typedef typename ScalarVector::Scalar Scalar; - LU_column_dfs_traits(Index jcol, Index& jsuper, LU_GlobalLU_t& glu) - : m_jcol(jcol), m_jsuper_ref(jsuper), m_glu(glu) - {} - bool update_segrep(Index /*krep*/, Index /*jj*/) - { - return true; - } - void mem_expand(IndexVector& lsub, int& nextl, int chmark) - { - if (nextl >= m_glu.nzlmax) - SparseLUBase::LUMemXpand(lsub, m_glu.nzlmax, nextl, LSUB, m_glu.num_expansions); - if (chmark != (m_jcol-1)) m_jsuper_ref = IND_EMPTY; - } - enum { ExpandMem = true }; - - int m_jcol; - int& m_jsuper_ref; - LU_GlobalLU_t& m_glu; -}; - template int SparseLUBase::LU_column_dfs(const int m, const int jcol, IndexVector& perm_r, int maxsuper, int& nseg, BlockIndexVector lsub_col, IndexVector& segrep, BlockIndexVector repfnz, IndexVector& xprune, IndexVector& marker, IndexVector& parent, IndexVector& xplore, GlobalLU_t& glu) { @@ -90,7 +97,7 @@ int SparseLUBase::LU_column_dfs(const int m, const int jcol, Index VectorBlock marker2(marker, 2*m, m); - LU_column_dfs_traits traits(jcol, jsuper, glu); + internal::LU_column_dfs_traits traits(jcol, jsuper, glu); // For each nonzero in A(*,jcol) do dfs for (int k = 0; lsub_col[k] != IND_EMPTY; k++) @@ -161,4 +168,7 @@ int SparseLUBase::LU_column_dfs(const int m, const int jcol, Index return 0; } -#endif \ No newline at end of file + +} // end namespace Eigen + +#endif diff --git a/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h b/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h index 1295812f4..10c85d4ff 100644 --- a/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h +++ b/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h @@ -29,6 +29,8 @@ #ifndef SPARSELU_COPY_TO_UCOL_H #define SPARSELU_COPY_TO_UCOL_H +namespace Eigen { + /** * \brief Performs numeric block updates (sup-col) in topological order * @@ -97,4 +99,6 @@ int SparseLUBase::LU_copy_to_ucol(const int jcol, const int nseg, return 0; } -#endif \ No newline at end of file +} // end namespace Eigen + +#endif // SPARSELU_COPY_TO_UCOL_H diff --git a/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h b/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h index 7f6b3bab2..b2be9e85a 100644 --- a/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h +++ b/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h @@ -27,7 +27,9 @@ #ifndef SPARSELU_HEAP_RELAX_SNODE_H #define SPARSELU_HEAP_RELAX_SNODE_H -#include "SparseLU_Coletree.h" + +namespace Eigen { + /** * \brief Identify the initial relaxed supernodes * @@ -116,4 +118,7 @@ void SparseLUBase::LU_heap_relax_snode (const int n, IndexVector& // Recover the original etree et = et_save; } -#endif + +} // end namespace Eigen + +#endif // SPARSELU_HEAP_RELAX_SNODE_H diff --git a/Eigen/src/SparseLU/SparseLU_kernel_bmod.h b/Eigen/src/SparseLU/SparseLU_kernel_bmod.h index cc8aaec2e..8b65ff37c 100644 --- a/Eigen/src/SparseLU/SparseLU_kernel_bmod.h +++ b/Eigen/src/SparseLU/SparseLU_kernel_bmod.h @@ -11,6 +11,8 @@ #ifndef SPARSELU_KERNEL_BMOD_H #define SPARSELU_KERNEL_BMOD_H +namespace Eigen { + /** * \brief Performs numeric block updates from a given supernode to a single column * @@ -108,4 +110,7 @@ template <> struct LU_kernel_bmod<1> dense.coeffRef(*(irow++)) -= f * *(a++); } }; -#endif + +} // end namespace Eigen + +#endif // SPARSELU_KERNEL_BMOD_H diff --git a/Eigen/src/SparseLU/SparseLU_panel_bmod.h b/Eigen/src/SparseLU/SparseLU_panel_bmod.h index bc2a04f44..d3aa9e139 100644 --- a/Eigen/src/SparseLU/SparseLU_panel_bmod.h +++ b/Eigen/src/SparseLU/SparseLU_panel_bmod.h @@ -31,6 +31,8 @@ #ifndef SPARSELU_PANEL_BMOD_H #define SPARSELU_PANEL_BMOD_H +namespace Eigen { + /** * \brief Performs numeric block updates (sup-panel) in topological order. * @@ -211,4 +213,7 @@ void SparseLUBase::LU_panel_bmod(const int m, const int w, const i } // End for each updating supernode } -#endif + +} // end namespace Eigen + +#endif // SPARSELU_PANEL_BMOD_H diff --git a/Eigen/src/SparseLU/SparseLU_panel_dfs.h b/Eigen/src/SparseLU/SparseLU_panel_dfs.h index 36e6b4670..9db4f8479 100644 --- a/Eigen/src/SparseLU/SparseLU_panel_dfs.h +++ b/Eigen/src/SparseLU/SparseLU_panel_dfs.h @@ -29,6 +29,35 @@ */ #ifndef SPARSELU_PANEL_DFS_H #define SPARSELU_PANEL_DFS_H + +namespace Eigen { + +namespace internal { + +template +struct LU_panel_dfs_traits +{ + typedef typename IndexVector::Scalar Index; + LU_panel_dfs_traits(Index jcol, Index* marker) + : m_jcol(jcol), m_marker(marker) + {} + bool update_segrep(Index krep, Index jj) + { + if(m_marker[krep] template void SparseLUBase::LU_dfs_kernel(const int jj, IndexVector& perm_r, @@ -185,28 +214,6 @@ void SparseLUBase::LU_dfs_kernel(const int jj, IndexVector& perm_r * */ -template -struct LU_panel_dfs_traits -{ - typedef typename IndexVector::Scalar Index; - LU_panel_dfs_traits(Index jcol, Index* marker) - : m_jcol(jcol), m_marker(marker) - {} - bool update_segrep(Index krep, Index jj) - { - if(m_marker[krep] void SparseLUBase::LU_panel_dfs(const int m, const int w, const int jcol, MatrixType& A, IndexVector& perm_r, int& nseg, ScalarVector& dense, IndexVector& panel_lsub, IndexVector& segrep, IndexVector& repfnz, IndexVector& xprune, IndexVector& marker, IndexVector& parent, IndexVector& xplore, GlobalLU_t& glu) { @@ -216,7 +223,7 @@ void SparseLUBase::LU_panel_dfs(const int m, const int w, const in VectorBlock marker1(marker, m, m); nseg = 0; - LU_panel_dfs_traits traits(jcol, marker1.data()); + internal::LU_panel_dfs_traits traits(jcol, marker1.data()); // For each column in the panel for (int jj = jcol; jj < jcol + w; jj++) @@ -242,6 +249,8 @@ void SparseLUBase::LU_panel_dfs(const int m, const int w, const in }// end for nonzeros in column jj } // end for column jj - } -#endif \ No newline at end of file + +} // end namespace Eigen + +#endif // SPARSELU_PANEL_DFS_H diff --git a/Eigen/src/SparseLU/SparseLU_pivotL.h b/Eigen/src/SparseLU/SparseLU_pivotL.h index 5df7d837a..67e748026 100644 --- a/Eigen/src/SparseLU/SparseLU_pivotL.h +++ b/Eigen/src/SparseLU/SparseLU_pivotL.h @@ -29,6 +29,9 @@ */ #ifndef SPARSELU_PIVOTL_H #define SPARSELU_PIVOTL_H + +namespace Eigen { + /** * \brief Performs the numerical pivotin on the current column of L, and the CDIV operation. * @@ -123,4 +126,7 @@ int SparseLUBase::LU_pivotL(const int jcol, const RealScalar diagp lu_col_ptr[k] *= temp; return 0; } -#endif \ No newline at end of file + +} // end namespace Eigen + +#endif // SPARSELU_PIVOTL_H diff --git a/Eigen/src/SparseLU/SparseLU_pruneL.h b/Eigen/src/SparseLU/SparseLU_pruneL.h index aac2c8c06..816358bc3 100644 --- a/Eigen/src/SparseLU/SparseLU_pruneL.h +++ b/Eigen/src/SparseLU/SparseLU_pruneL.h @@ -30,6 +30,8 @@ #ifndef SPARSELU_PRUNEL_H #define SPARSELU_PRUNEL_H +namespace Eigen { + /** * \brief Prunes the L-structure. * @@ -126,4 +128,6 @@ void SparseLUBase::LU_pruneL(const int jcol, const IndexVector& pe } // End for each U-segment } -#endif \ No newline at end of file +} // end namespace Eigen + +#endif // SPARSELU_PRUNEL_H diff --git a/Eigen/src/SparseLU/SparseLU_relax_snode.h b/Eigen/src/SparseLU/SparseLU_relax_snode.h index 8db8619c1..0700b3d42 100644 --- a/Eigen/src/SparseLU/SparseLU_relax_snode.h +++ b/Eigen/src/SparseLU/SparseLU_relax_snode.h @@ -27,6 +27,9 @@ #ifndef SPARSELU_RELAX_SNODE_H #define SPARSELU_RELAX_SNODE_H + +namespace Eigen { + /** * \brief Identify the initial relaxed supernodes * @@ -70,4 +73,7 @@ void SparseLUBase::LU_relax_snode (const int n, IndexVector& et, c } // End postorder traversal of the etree } + +} // end namespace Eigen + #endif