30 #ifndef SPARSELU_COLUMN_DFS_H 31 #define SPARSELU_COLUMN_DFS_H 38 template<
typename IndexVector,
typename ScalarVector>
44 : m_jcol(jcol), m_jsuper_ref(jsuper), m_glu(glu), m_luImpl(luImpl)
46 bool update_segrep(Index , Index )
50 void mem_expand(IndexVector& lsub, Index& nextl, Index chmark)
52 if (nextl >= m_glu.nzlmax)
53 m_luImpl.memXpand(lsub, m_glu.nzlmax, nextl, LSUB, m_glu.num_expansions);
54 if (chmark != (m_jcol-1)) m_jsuper_ref = emptyIdxLU;
56 enum { ExpandMem =
true };
92 template <
typename Scalar,
typename Index>
93 Index
SparseLUImpl<Scalar,Index>::column_dfs(
const Index m,
const Index jcol,
IndexVector& perm_r, Index maxsuper, Index& nseg,
BlockIndexVector lsub_col,
IndexVector& segrep,
BlockIndexVector repfnz,
IndexVector& xprune,
IndexVector& marker,
IndexVector& parent,
IndexVector& xplore,
GlobalLU_t& glu)
96 Index jsuper = glu.supno(jcol);
97 Index nextl = glu.xlsub(jcol);
104 for (Index k = 0; ((k < m) ? lsub_col[k] != emptyIdxLU :
false) ; k++)
106 Index krow = lsub_col(k);
107 lsub_col(k) = emptyIdxLU;
108 Index kmark = marker2(krow);
111 if (kmark == jcol)
continue;
113 dfs_kernel(jcol, perm_r, nseg, glu.lsub, segrep, repfnz, xprune, marker2, parent,
114 xplore, glu, nextl, krow, traits);
117 Index fsupc, jptr, jm1ptr, ito, ifrom, istop;
118 Index nsuper = glu.supno(jcol);
119 Index jcolp1 = jcol + 1;
120 Index jcolm1 = jcol - 1;
125 nsuper = glu.supno(0) = 0 ;
129 fsupc = glu.xsup(nsuper);
130 jptr = glu.xlsub(jcol);
131 jm1ptr = glu.xlsub(jcolm1);
134 if ( (nextl-jptr != jptr-jm1ptr-1) ) jsuper = emptyIdxLU;
138 if ( (jcol - fsupc) >= maxsuper) jsuper = emptyIdxLU;
145 if (jsuper == emptyIdxLU)
147 if ( (fsupc < jcolm1-1) )
149 ito = glu.xlsub(fsupc+1);
150 glu.xlsub(jcolm1) = ito;
151 istop = ito + jptr - jm1ptr;
152 xprune(jcolm1) = istop;
153 glu.xlsub(jcol) = istop;
155 for (ifrom = jm1ptr; ifrom < nextl; ++ifrom, ++ito)
156 glu.lsub(ito) = glu.lsub(ifrom);
160 glu.supno(jcol) = nsuper;
165 glu.xsup(nsuper+1) = jcolp1;
166 glu.supno(jcolp1) = nsuper;
167 xprune(jcol) = nextl;
168 glu.xlsub(jcolp1) = nextl;
iterative scaling algorithm to equilibrate rows and column norms in matrices
Definition: TestIMU_Common.h:87
Definition: SparseLU_column_dfs.h:33
Definition: XprHelper.h:32
Index column_dfs(const Index m, const Index jcol, IndexVector &perm_r, Index maxsuper, Index &nseg, BlockIndexVector lsub_col, IndexVector &segrep, BlockIndexVector repfnz, IndexVector &xprune, IndexVector &marker, IndexVector &parent, IndexVector &xplore, GlobalLU_t &glu)
Performs a symbolic factorization on column jcol and decide the supernode boundary.
Definition: SparseLU_column_dfs.h:93
Definition: SparseLU_Structs.h:77
Expression of a fixed-size or dynamic-size sub-vector.
Definition: ForwardDeclarations.h:83
Definition: SparseLU_column_dfs.h:39
A matrix or vector expression mapping an existing expressions.
Definition: Ref.h:17
Base class for sparseLU.
Definition: SparseLUImpl.h:20
Definition: BandTriangularSolver.h:13
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:127
Definition: ForwardDeclarations.h:17
double Scalar
Common scalar type.
Definition: FlexibleKalmanBase.h:48