30 #ifndef SPARSELU_PRUNEL_H 31 #define SPARSELU_PRUNEL_H 52 template <
typename Scalar,
typename StorageIndex>
57 Index jsupno = glu.supno(jcol);
59 bool movnum, do_prune =
false;
60 Index kmin = 0, kmax = 0, minloc, maxloc,krow;
61 for (i = 0; i < nseg; i++)
68 if (repfnz(irep) == emptyIdxLU)
continue;
73 if (glu.supno(irep) == glu.supno(irep1) )
continue;
76 if (glu.supno(irep) != jsupno )
78 if ( xprune (irep) >= glu.xlsub(irep1) )
80 kmin = glu.xlsub(irep);
81 kmax = glu.xlsub(irep1) - 1;
82 for (krow = kmin; krow <= kmax; krow++)
84 if (glu.lsub(krow) == pivrow)
97 if (irep == glu.xsup(glu.supno(irep)) )
102 if (perm_r(glu.lsub(kmax)) == emptyIdxLU)
104 else if ( perm_r(glu.lsub(kmin)) != emptyIdxLU)
110 std::swap(glu.lsub(kmin), glu.lsub(kmax));
118 minloc = glu.xlusup(irep) + ( kmin - glu.xlsub(irep) );
119 maxloc = glu.xlusup(irep) + ( kmax - glu.xlsub(irep) );
120 std::swap(glu.lusup(minloc), glu.lusup(maxloc));
127 xprune(irep) = StorageIndex(kmin);
136 #endif // SPARSELU_PRUNEL_H 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
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:85
Definition: SparseLU_Structs.h:77
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:33
A matrix or vector expression mapping an existing expression.
Definition: Ref.h:190
Definition: BandTriangularSolver.h:13
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:178