30 #ifndef SPARSELU_PRUNEL_H
31 #define SPARSELU_PRUNEL_H
54 template <
typename Scalar,
typename StorageIndex>
56 const IndexVector& segrep, BlockIndexVector repfnz, IndexVector& xprune, GlobalLU_t& glu)
59 Index jsupno = glu.supno(jcol);
61 bool movnum, do_prune =
false;
62 Index kmin = 0, kmax = 0, minloc, maxloc,krow;
63 for (
i = 0;
i < nseg;
i++)
75 if (glu.supno(irep) == glu.supno(irep1) )
continue;
78 if (glu.supno(irep) != jsupno )
80 if ( xprune (irep) >= glu.xlsub(irep1) )
82 kmin = glu.xlsub(irep);
83 kmax = glu.xlsub(irep1) - 1;
84 for (krow = kmin; krow <= kmax; krow++)
86 if (glu.lsub(krow) == pivrow)
99 if (irep == glu.xsup(glu.supno(irep)) )
106 else if ( perm_r(glu.lsub(kmin)) !=
emptyIdxLU)
112 std::swap(glu.lsub(kmin), glu.lsub(kmax));
120 minloc = glu.xlusup(irep) + ( kmin - glu.xlsub(irep) );
121 maxloc = glu.xlusup(irep) + ( kmax - glu.xlsub(irep) );
122 std::swap(glu.lusup(minloc), glu.lusup(maxloc));
129 xprune(irep) = StorageIndex(kmin);
void swap(scoped_array< T > &a, scoped_array< T > &b)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.