10#ifndef EIGEN_SPARSELU_UTILS_H
11#define EIGEN_SPARSELU_UTILS_H
14#include "./InternalHeaderCheck.h"
22template <
typename Scalar,
typename StorageIndex>
23void SparseLUImpl<Scalar, StorageIndex>::countnz(
const Index n, Index& nnzL, Index& nnzU, GlobalLU_t& glu) {
25 nnzU = (glu.xusub)(n);
26 Index nsuper = (glu.supno)(n);
31 for (i = 0; i <= nsuper; i++) {
33 jlen = glu.xlsub(fsupc + 1) - glu.xlsub(fsupc);
35 for (j = fsupc; j < glu.xsup(i + 1); j++) {
37 nnzU += j - fsupc + 1;
50template <
typename Scalar,
typename StorageIndex>
51void SparseLUImpl<Scalar, StorageIndex>::fixupL(
const Index n,
const IndexVector& perm_r, GlobalLU_t& glu) {
52 Index fsupc, i, j, k, jstart;
54 StorageIndex nextl = 0;
55 Index nsuper = (glu.supno)(n);
58 for (i = 0; i <= nsuper; i++) {
60 jstart = glu.xlsub(fsupc);
61 glu.xlsub(fsupc) = nextl;
62 for (j = jstart; j < glu.xlsub(fsupc + 1); j++) {
63 glu.lsub(nextl) = perm_r(glu.lsub(j));
66 for (k = fsupc + 1; k < glu.xsup(i + 1); k++) glu.xlsub(k) = nextl;
Namespace containing all symbols from the Eigen library.
Definition Core:137