29 #ifndef SPARSELU_COPY_TO_UCOL_H 30 #define SPARSELU_COPY_TO_UCOL_H 33 #include "./InternalHeaderCheck.h" 52 template <
typename Scalar,
typename StorageIndex>
56 Index ksub, krep, ksupno;
58 Index jsupno = glu.supno(jcol);
61 Index k = nseg - 1, i;
62 StorageIndex nextu = glu.xusub(jcol);
63 Index kfnz, isub, segsize;
66 for (ksub = 0; ksub < nseg; ksub++) {
69 ksupno = glu.supno(krep);
73 if (kfnz != emptyIdxLU) {
74 fsupc = glu.xsup(ksupno);
75 isub = glu.xlsub(fsupc) + kfnz - fsupc;
76 segsize = krep - kfnz + 1;
77 new_next = nextu + segsize;
78 while (new_next > glu.nzumax) {
79 mem = memXpand<ScalarVector>(glu.ucol, glu.nzumax, nextu, UCOL, glu.num_expansions);
81 mem = memXpand<IndexVector>(glu.usub, glu.nzumax, nextu, USUB, glu.num_expansions);
85 for (i = 0; i < segsize; i++) {
86 irow = glu.lsub(isub);
87 glu.usub(nextu) = perm_r(irow);
88 glu.ucol(nextu) = dense(irow);
89 dense(irow) = Scalar(0.0);
99 glu.xusub(jcol + 1) = nextu;
106 #endif // SPARSELU_COPY_TO_UCOL_H Namespace containing all symbols from the Eigen library.
Definition: B01_Experimental.dox:1
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:82
A matrix or vector expression mapping an existing expression.
Definition: Ref.h:264
Index copy_to_ucol(const Index jcol, const Index nseg, IndexVector &segrep, BlockIndexVector repfnz, IndexVector &perm_r, BlockScalarVector dense, GlobalLU_t &glu)
Performs numeric block updates (sup-col) in topological order.
Definition: SparseLU_copy_to_ucol.h:53
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:186