30 #ifndef SPARSELU_PRUNEL_H 31 #define SPARSELU_PRUNEL_H 52 template <
typename Scalar,
typename Index>
56 Index jsupno = glu.
supno(jcol);
58 bool movnum, do_prune =
false;
59 Index kmin = 0, kmax = 0, minloc, maxloc,krow;
60 for (i = 0; i < nseg; i++)
72 if (glu.
supno(irep) == glu.
supno(irep1) )
continue;
75 if (glu.
supno(irep) != jsupno )
77 if ( xprune (irep) >= glu.
xlsub(irep1) )
79 kmin = glu.
xlsub(irep);
80 kmax = glu.
xlsub(irep1) - 1;
81 for (krow = kmin; krow <= kmax; krow++)
83 if (glu.
lsub(krow) == pivrow)
109 std::swap(glu.
lsub(kmin), glu.
lsub(kmax));
117 minloc = glu.
xlusup(irep) + ( kmin - glu.
xlsub(irep) );
118 maxloc = glu.
xlusup(irep) + ( kmax - glu.
xlsub(irep) );
119 std::swap(glu.
lusup(minloc), glu.
lusup(maxloc));
135 #endif // SPARSELU_PRUNEL_H
iterative scaling algorithm to equilibrate rows and column norms in matrices
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.
A matrix or vector expression mapping an existing expressions.