31 #ifndef SPARSELU_COLUMN_BMOD_H 32 #define SPARSELU_COLUMN_BMOD_H 52 template <
typename Scalar,
typename Index>
55 Index jsupno, k, ksub, krep, ksupno;
56 Index lptr, nrow, isub, irow, nextlu, new_next, ufirst;
57 Index fsupc, nsupc, nsupr, luptr, kfnz, no_zeros;
67 jsupno = glu.supno(jcol);
74 for (ksub = 0; ksub < nseg; ksub++)
76 krep = segrep(k); k--;
77 ksupno = glu.supno(krep);
78 if (jsupno != ksupno )
81 fsupc = glu.xsup(ksupno);
82 fst_col = (std::max)(fsupc, fpanelc);
86 d_fsupc = fst_col - fsupc;
88 luptr = glu.xlusup(fst_col) + d_fsupc;
89 lptr = glu.xlsub(fsupc) + d_fsupc;
92 kfnz = (std::max)(kfnz, fpanelc);
94 segsize = krep - kfnz + 1;
95 nsupc = krep - fst_col + 1;
96 nsupr = glu.xlsub(fsupc+1) - glu.xlsub(fsupc);
97 nrow = nsupr - d_fsupc - nsupc;
98 Index lda = glu.xlusup(fst_col+1) - glu.xlusup(fst_col);
103 no_zeros = kfnz - fst_col;
112 nextlu = glu.xlusup(jcol);
113 fsupc = glu.xsup(jsupno);
117 new_next = nextlu + glu.xlsub(fsupc + 1) - glu.xlsub(fsupc);
121 while (new_next > glu.nzlumax )
123 mem = memXpand<ScalarVector>(glu.lusup, glu.nzlumax, nextlu, LUSUP, glu.num_expansions);
127 for (isub = glu.xlsub(fsupc); isub < glu.xlsub(fsupc+1); isub++)
129 irow = glu.lsub(isub);
130 glu.lusup(nextlu) = dense(irow);
131 dense(irow) =
Scalar(0.0);
137 glu.lusup.segment(nextlu,offset).setZero();
140 glu.xlusup(jcol + 1) = nextlu;
148 fst_col = (std::max)(fsupc, fpanelc);
154 d_fsupc = fst_col - fsupc;
156 lptr = glu.xlsub(fsupc) + d_fsupc;
157 luptr = glu.xlusup(fst_col) + d_fsupc;
158 nsupr = glu.xlsub(fsupc+1) - glu.xlsub(fsupc);
159 nsupc = jcol - fst_col;
160 nrow = nsupr - d_fsupc - nsupc;
163 ufirst = glu.xlusup(jcol) + d_fsupc;
164 Index lda = glu.xlusup(jcol+1) - glu.xlusup(jcol);
167 u = A.template triangularView<UnitLower>().solve(u);
171 l.noalias() -= A * u;
180 #endif // SPARSELU_COLUMN_BMOD_H Index column_bmod(const Index jcol, const Index nseg, BlockScalarVector dense, ScalarVector &tempv, BlockIndexVector segrep, BlockIndexVector repfnz, Index fpanelc, GlobalLU_t &glu)
Performs numeric block updates (sup-col) in topological order.
Definition: SparseLU_column_bmod.h:53
A matrix or vector expression mapping an existing array of data.
Definition: Map.h:104
iterative scaling algorithm to equilibrate rows and column norms in matrices
Definition: TestIMU_Common.h:87
Definition: GenericPacketMath.h:71
Definition: SparseLU_Structs.h:77
Expression of a fixed-size or dynamic-size sub-vector.
Definition: ForwardDeclarations.h:83
Performs numeric block updates from a given supernode to a single column.
Definition: SparseLU_kernel_bmod.h:31
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