30#ifndef SPARSELU_PRUNEL_H
31#define SPARSELU_PRUNEL_H
34#include "./InternalHeaderCheck.h"
55template <
typename Scalar,
typename StorageIndex>
56void SparseLUImpl<Scalar, StorageIndex>::pruneL(
const Index jcol,
const IndexVector& perm_r,
const Index pivrow,
57 const Index nseg,
const IndexVector& segrep, BlockIndexVector repfnz,
58 IndexVector& xprune, GlobalLU_t& glu) {
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);
Namespace containing all symbols from the Eigen library.
Definition Core:137