30 #ifndef SPARSELU_PRUNEL_H 31 #define SPARSELU_PRUNEL_H 34 #include "./InternalHeaderCheck.h" 55 template <
typename Scalar,
typename StorageIndex>
60 Index jsupno = glu.supno(jcol);
62 bool movnum, do_prune =
false;
63 Index kmin = 0, kmax = 0, minloc, maxloc, krow;
64 for (i = 0; i < nseg; i++) {
70 if (repfnz(irep) == emptyIdxLU)
continue;
75 if (glu.supno(irep) == glu.supno(irep1))
continue;
78 if (glu.supno(irep) != jsupno) {
79 if (xprune(irep) >= glu.xlsub(irep1)) {
80 kmin = glu.xlsub(irep);
81 kmax = glu.xlsub(irep1) - 1;
82 for (krow = kmin; krow <= kmax; krow++) {
83 if (glu.lsub(krow) == pivrow) {
94 if (irep == glu.xsup(glu.supno(irep)))
97 while (kmin <= kmax) {
98 if (perm_r(glu.lsub(kmax)) == emptyIdxLU)
100 else if (perm_r(glu.lsub(kmin)) != emptyIdxLU)
105 std::swap(glu.lsub(kmin), glu.lsub(kmax));
112 minloc = glu.xlusup(irep) + (kmin - glu.xlsub(irep));
113 maxloc = glu.xlusup(irep) + (kmax - glu.xlsub(irep));
114 std::swap(glu.lusup(minloc), glu.lusup(maxloc));
121 xprune(irep) = StorageIndex(kmin);
130 #endif // SPARSELU_PRUNEL_H Namespace containing all symbols from the Eigen library.
Definition: B01_Experimental.dox:1
void pruneL(const Index jcol, const IndexVector &perm_r, const Index pivrow, const Index nseg, const IndexVector &segrep, BlockIndexVector repfnz, IndexVector &xprune, GlobalLU_t &glu)
Prunes the L-structure.
Definition: SparseLU_pruneL.h:56
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:82
A matrix or vector expression mapping an existing expression.
Definition: Ref.h:264
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:186