MCPcopy Create free account
hub / github.com/TinyMPC/TinyMPC / fixupL

Method fixupL

include/Eigen/Eigen/src/SparseLU/SparseLU_Utils.h:54–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 */
53template <typename Scalar, typename StorageIndex>
54void SparseLUImpl<Scalar,StorageIndex>::fixupL(const Index n, const IndexVector& perm_r, GlobalLU_t& glu)
55{
56 Index fsupc, i, j, k, jstart;
57
58 StorageIndex nextl = 0;
59 Index nsuper = (glu.supno)(n);
60
61 // For each supernode
62 for (i = 0; i <= nsuper; i++)
63 {
64 fsupc = glu.xsup(i);
65 jstart = glu.xlsub(fsupc);
66 glu.xlsub(fsupc) = nextl;
67 for (j = jstart; j < glu.xlsub(fsupc + 1); j++)
68 {
69 glu.lsub(nextl) = perm_r(glu.lsub(j)); // Now indexed into P*A
70 nextl++;
71 }
72 for (k = fsupc+1; k < glu.xsup(i+1); k++)
73 glu.xlsub(k) = nextl; // other columns in supernode i
74 }
75
76 glu.xlsub(n) = nextl;
77}
78
79} // end namespace internal
80

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected