Add additional methods in SparseLU and Improve the naming conventions

This commit is contained in:
Desire NUENTSA
2013-01-25 20:38:26 +01:00
parent d58056bde4
commit 7f0f7ab5b4
18 changed files with 334 additions and 257 deletions

View File

@@ -31,6 +31,7 @@
#define SPARSELU_PRUNEL_H
namespace Eigen {
namespace internal {
/**
* \brief Prunes the L-structure.
@@ -49,7 +50,7 @@ namespace Eigen {
*
*/
template <typename Scalar, typename Index>
void SparseLUBase<Scalar,Index>::LU_pruneL(const int jcol, const IndexVector& perm_r, const int pivrow, const int nseg, const IndexVector& segrep, BlockIndexVector repfnz, IndexVector& xprune, GlobalLU_t& glu)
void SparseLUImpl<Scalar,Index>::pruneL(const int jcol, const IndexVector& perm_r, const int pivrow, const int nseg, const IndexVector& segrep, BlockIndexVector repfnz, IndexVector& xprune, GlobalLU_t& glu)
{
// For each supernode-rep irep in U(*,j]
int jsupno = glu.supno(jcol);
@@ -63,7 +64,7 @@ void SparseLUBase<Scalar,Index>::LU_pruneL(const int jcol, const IndexVector& pe
do_prune = false;
// Don't prune with a zero U-segment
if (repfnz(irep) == IND_EMPTY) continue;
if (repfnz(irep) == emptyIdxLU) continue;
// If a snode overlaps with the next panel, then the U-segment
// is fragmented into two parts -- irep and irep1. We should let
@@ -97,9 +98,9 @@ void SparseLUBase<Scalar,Index>::LU_pruneL(const int jcol, const IndexVector& pe
while (kmin <= kmax)
{
if (perm_r(glu.lsub(kmax)) == IND_EMPTY)
if (perm_r(glu.lsub(kmax)) == emptyIdxLU)
kmax--;
else if ( perm_r(glu.lsub(kmin)) != IND_EMPTY)
else if ( perm_r(glu.lsub(kmin)) != emptyIdxLU)
kmin++;
else
{
@@ -128,6 +129,7 @@ void SparseLUBase<Scalar,Index>::LU_pruneL(const int jcol, const IndexVector& pe
} // End for each U-segment
}
} // end namespace internal
} // end namespace Eigen
#endif // SPARSELU_PRUNEL_H