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++)
67 if (repfnz(irep) == emptyIdxLU)
continue;
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)
96 if (irep == glu.xsup(glu.supno(irep)) )
101 if (perm_r(glu.lsub(kmax)) == emptyIdxLU)
103 else if ( perm_r(glu.lsub(kmin)) != emptyIdxLU)
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
Definition: TestIMU_Common.h:87
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:53
Definition: SparseLU_Structs.h:77
A matrix or vector expression mapping an existing expressions.
Definition: Ref.h:17
Definition: BandTriangularSolver.h:13
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:127