aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/SparseLU/SparseLU_column_dfs.h
diff options
context:
space:
mode:
authorGravatar Desire NUENTSA <desire.nuentsa_wakam@inria.fr>2012-09-25 09:53:40 +0200
committerGravatar Desire NUENTSA <desire.nuentsa_wakam@inria.fr>2012-09-25 09:53:40 +0200
commita01371548dc66ee8cbfac8effd5f560bf5d5697a (patch)
tree67ff5e2b68f97f534cb48161821257260e6a908a /Eigen/src/SparseLU/SparseLU_column_dfs.h
parent7740127e3da88512d409bf0b2a045f373d067af1 (diff)
Define sparseLU functions as static
Diffstat (limited to 'Eigen/src/SparseLU/SparseLU_column_dfs.h')
-rw-r--r--Eigen/src/SparseLU/SparseLU_column_dfs.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/Eigen/src/SparseLU/SparseLU_column_dfs.h b/Eigen/src/SparseLU/SparseLU_column_dfs.h
index 568e0686c..fa8dcf18d 100644
--- a/Eigen/src/SparseLU/SparseLU_column_dfs.h
+++ b/Eigen/src/SparseLU/SparseLU_column_dfs.h
@@ -42,15 +42,15 @@
* \param m number of rows in the matrix
* \param jcol Current column
* \param perm_r Row permutation
- * \param maxsuper
+ * \param maxsuper Maximum number of column allowed in a supernode
* \param [in,out] nseg Number of segments in current U[*,j] - new segments appended
* \param lsub_col defines the rhs vector to start the dfs
* \param [in,out] segrep Segment representatives - new segments appended
- * \param repfnz
+ * \param repfnz First nonzero location in each row
* \param xprune
- * \param marker
+ * \param marker marker[i] == jj, if i was visited during dfs of current column jj;
* \param parent
- * \param xplore
+ * \param xplore working array
* \param glu global LU data
* \return 0 success
* > 0 number of bytes allocated when run out of space
@@ -60,6 +60,7 @@ template<typename IndexVector, typename ScalarVector>
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<IndexVector, ScalarVector>& glu)
: m_jcol(jcol), m_jsuper_ref(jsuper), m_glu(glu)
{}
@@ -70,7 +71,7 @@ struct LU_column_dfs_traits
void mem_expand(IndexVector& lsub, int& nextl, int chmark)
{
if (nextl >= m_glu.nzlmax)
- LUMemXpand<IndexVector>(lsub, m_glu.nzlmax, nextl, LSUB, m_glu.num_expansions);
+ SparseLUBase<Scalar,Index>::LUMemXpand(lsub, m_glu.nzlmax, nextl, LSUB, m_glu.num_expansions);
if (chmark != (m_jcol-1)) m_jsuper_ref = IND_EMPTY;
}
enum { ExpandMem = true };
@@ -80,11 +81,9 @@ struct LU_column_dfs_traits
LU_GlobalLU_t<IndexVector, ScalarVector>& m_glu;
};
-template <typename IndexVector, typename ScalarVector, typename BlockIndexVector>
-int 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, LU_GlobalLU_t<IndexVector, ScalarVector>& glu)
+template <typename Scalar, typename Index>
+int SparseLUBase<Scalar,Index>::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)
{
- typedef typename IndexVector::Scalar Index;
- typedef typename ScalarVector::Scalar Scalar;
int jsuper = glu.supno(jcol);
int nextl = glu.xlsub(jcol);