28 #ifndef SPARSELU_HEAP_RELAX_SNODE_H
29 #define SPARSELU_HEAP_RELAX_SNODE_H
47 template <
typename Scalar,
typename StorageIndex>
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);
62 iwork(post(
i)) = post(et(
i));
70 descendants.setZero();
71 for (
j = 0;
j <
n;
j++)
75 descendants(parent) += descendants(
j) + 1;
85 while ( parent !=
n && descendants(parent) < relax_columns )
95 if ( (l - k) == (
j - snode_start) )
105 if (descendants(
i) == 0)
113 while (descendants(
j) != 0 &&
j <
n)
j++;
bfloat16() min(const bfloat16 &a, const bfloat16 &b)
void treePostorder(typename IndexVector::Scalar n, IndexVector &parent, IndexVector &post)
Post order a tree.
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.