53 #ifndef vtk_m_worklet_contourtree_distributed_tree_grafter_identify_leaf_hyperarcs_worklet_h
54 #define vtk_m_worklet_contourtree_distributed_tree_grafter_identify_leaf_hyperarcs_worklet_h
64 namespace contourtree_distributed
66 namespace tree_grafter
91 WholeArrayIn supernodeType,
92 WholeArrayIn upNeighbour,
93 WholeArrayIn downNeighbour,
94 WholeArrayOut hierarchicalHyperparent,
95 WholeArrayOut hierarchicalHyperarcPortal,
96 WholeArrayOut whenTransferredPortal
109 template <
typename InFieldPortalType,
typename OutFieldPortalType>
111 const InFieldPortalType supernodeTypePortal,
112 const InFieldPortalType upNeighbourPortal,
113 const InFieldPortalType downNeighbourPortal,
114 const OutFieldPortalType& hierarchicalHyperparentPortal,
115 const OutFieldPortalType& hierarchicalHyperarcPortal,
116 const OutFieldPortalType& whenTransferredPortal)
const
124 switch (supernodeTypePortal.Get(high))
129 hierarchicalHyperparentPortal.Set(high, high);
130 hierarchicalHyperarcPortal.Set(
132 whenTransferredPortal.Set(
149 if (supernodeTypePortal.Get(upNbr) ==
152 hierarchicalHyperparentPortal.Set(high, upNbr);
153 whenTransferredPortal.Set(high,
158 else if (supernodeTypePortal.Get(downNbr) ==
161 hierarchicalHyperparentPortal.Set(high, downNbr);
162 whenTransferredPortal.Set(high,
177 switch (supernodeTypePortal.Get(low))
181 hierarchicalHyperparentPortal.Set(low, low);
182 hierarchicalHyperarcPortal.Set(
186 whenTransferredPortal.Set(low,
203 if (supernodeTypePortal.Get(upNbr) ==
206 hierarchicalHyperparentPortal.Set(low, upNbr);
207 whenTransferredPortal.Set(low,
212 else if (supernodeTypePortal.Get(downNbr) ==
215 hierarchicalHyperparentPortal.Set(low, downNbr);
216 whenTransferredPortal.Set(low,