29 #ifndef SPARSELU_COPY_TO_UCOL_H 30 #define SPARSELU_COPY_TO_UCOL_H 49 template <
typename Scalar,
typename Index>
52 Index ksub, krep, ksupno;
54 Index jsupno = glu.supno(jcol);
57 Index k = nseg - 1, i;
58 Index nextu = glu.xusub(jcol);
59 Index kfnz, isub, segsize;
62 for (ksub = 0; ksub < nseg; ksub++)
64 krep = segrep(k); k--;
65 ksupno = glu.supno(krep);
66 if (jsupno != ksupno )
69 if (kfnz != emptyIdxLU)
71 fsupc = glu.xsup(ksupno);
72 isub = glu.xlsub(fsupc) + kfnz - fsupc;
73 segsize = krep - kfnz + 1;
74 new_next = nextu + segsize;
75 while (new_next > glu.nzumax)
77 mem = memXpand<ScalarVector>(glu.ucol, glu.nzumax, nextu, UCOL, glu.num_expansions);
79 mem = memXpand<IndexVector>(glu.usub, glu.nzumax, nextu, USUB, glu.num_expansions);
84 for (i = 0; i < segsize; i++)
86 irow = glu.lsub(isub);
87 glu.usub(nextu) = perm_r(irow);
88 glu.ucol(nextu) = dense(irow);
99 glu.xusub(jcol + 1) = nextu;
106 #endif // SPARSELU_COPY_TO_UCOL_H 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:50
iterative scaling algorithm to equilibrate rows and column norms in matrices
Definition: TestIMU_Common.h:87
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
double Scalar
Common scalar type.
Definition: FlexibleKalmanBase.h:48