28#ifndef SPARSELU_HEAP_RELAX_SNODE_H
29#define SPARSELU_HEAP_RELAX_SNODE_H
32#include "./InternalHeaderCheck.h"
48template <
typename Scalar,
typename StorageIndex>
49void SparseLUImpl<Scalar, StorageIndex>::heap_relax_snode(
const Index n, IndexVector& et,
const Index relax_columns,
50 IndexVector& descendants, IndexVector& relax_end) {
53 internal::treePostorder(StorageIndex(n), et, post);
54 IndexVector inv_post(n + 1);
55 for (StorageIndex i = 0; i < n + 1; ++i) inv_post(post(i)) = i;
59 IndexVector et_save(n + 1);
60 for (Index i = 0; i < n; ++i) {
61 iwork(post(i)) = post(et(i));
67 relax_end.setConstant(emptyIdxLU);
69 descendants.setZero();
70 for (j = 0; j < n; j++) {
73 descendants(parent) += descendants(j) + 1;
82 while (parent != n && descendants(parent) < relax_columns) {
88 for (Index i = snode_start; i <= j; ++i) k = (std::min)(k, inv_post(i));
90 if ((l - k) == (j - snode_start))
95 for (Index i = snode_start; i <= j; ++i) {
97 if (descendants(i) == 0) {
104 while (descendants(j) != 0 && j < n) j++;
Namespace containing all symbols from the Eigen library.
Definition Core:137