aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/SparseLU/SparseLU_panel_dfs.h
diff options
context:
space:
mode:
authorGravatar Desire NUENTSA <desire.nuentsa_wakam@inria.fr>2012-06-12 18:19:59 +0200
committerGravatar Desire NUENTSA <desire.nuentsa_wakam@inria.fr>2012-06-12 18:19:59 +0200
commitc0ad1094995e28a2d564e83a2ca1c6b76cfbd536 (patch)
tree2e9ec18c5734e9dc052bd035427d509bb580997a /Eigen/src/SparseLU/SparseLU_panel_dfs.h
parentbccf64d34281066da48cf2da29fd61f7ed703025 (diff)
Checking Data structures and function prototypes
Diffstat (limited to 'Eigen/src/SparseLU/SparseLU_panel_dfs.h')
-rw-r--r--Eigen/src/SparseLU/SparseLU_panel_dfs.h43
1 files changed, 24 insertions, 19 deletions
diff --git a/Eigen/src/SparseLU/SparseLU_panel_dfs.h b/Eigen/src/SparseLU/SparseLU_panel_dfs.h
index 97e5121db..d3c2906b2 100644
--- a/Eigen/src/SparseLU/SparseLU_panel_dfs.h
+++ b/Eigen/src/SparseLU/SparseLU_panel_dfs.h
@@ -62,45 +62,50 @@
* marker[i] == jj, if i was visited during dfs of current column jj;
* marker1[i] >= jcol, if i was visited by earlier columns in this panel;
*
- * \param m number of rows in the matrix
- * \param w Panel size
- * \param jcol Starting column of the panel
- * \param A Input matrix in column-major storage
- * \param perm_r Row permutation
- * \param nseg Number of U segments
- * ...
+ * \param [in]m number of rows in the matrix
+ * \param [in]w Panel size
+ * \param [in]jcol Starting column of the panel
+ * \param [in]A Input matrix in column-major storage
+ * \param [in]perm_r Row permutation
+ * \param [out]nseg Number of U segments
+ * \param [out]dense Accumulate the column vectors of the panel
+ * \param [out]panel_lsub Subscripts of the row in the panel
+ * \param [out]segrep Segment representative i.e first nonzero row of each segment
+ * \param [out]repfnz First nonzero location in each row
+ * \param [out]xprune
+ * \param [out]marker
+ *
*
*/
-template <typename MatrixType, typename VectorType>
-void SparseLU::LU_panel_dfs(const int m, const int w, const int jcol, MatrixType& A, VectorXi& perm_r, int& nseg, VectorType& dense, VectorXi& panel_lsub, VectorXi& segrep, VectorXi& repfnz, VectorXi& xprune, VectorXi& marker, VectorXi& parent, VectorXi& xplore, LU_GlobalLu_t& Glu)
+template <typename MatrixType, typename IndexVector, typename ScalarVector>
+void SparseLU::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, LU_GlobalLU_t& Glu)
{
int jj; // Index through each column in the panel
int nextl_col; // Next available position in panel_lsub[*,jj]
int krow; // Row index of the current element
int kperm; // permuted row index
- int krep; // Supernode reprentative of the current row
+ int krep; // Supernode representative of the current row
int kmark;
int chperm, chmark, chrep, oldrep, kchild;
int myfnz; // First nonzero element in the current column
int xdfs, maxdfs, kpar;
// Initialize pointers
-// VectorXi& marker1 = marker.block(m, m);
- VectorBlock<VectorXi> marker1(marker, m, m);
+// IndexVector& marker1 = marker.block(m, m);
+ VectorBlock<IndexVector> marker1(marker, m, m);
nseg = 0;
- VectorXi& xsup = Glu.xsup;
- VectorXi& supno = Glu.supno;
- VectorXi& lsub = Glu.lsub;
- VectorXi& xlsub = Glu.xlsub;
+ IndexVector& xsup = Glu.xsup;
+ IndexVector& supno = Glu.supno;
+ IndexVector& lsub = Glu.lsub;
+ IndexVector& xlsub = Glu.xlsub;
// For each column in the panel
for (jj = jcol; jj < jcol + w; jj++)
{
nextl_col = (jj - jcol) * m;
- //FIXME
- VectorBlock<VectorXi> repfnz_col(repfnz.segment(nextl_col, m)); // First nonzero location in each row
- VectorBlock<VectorXi> dense_col(dense.segment(nextl_col, m)); // Accumulate a column vector here
+ VectorBlock<IndexVector> repfnz_col(repfnz, nextl_col, m); // First nonzero location in each row
+ VectorBlock<IndexVector> dense_col(dense,nextl_col, m); // Accumulate a column vector here
// For each nnz in A[*, jj] do depth first search