54 #ifndef vtk_m_worklet_contourtree_augmented_active_graph_initialize_active_graph_vertices_h
55 #define vtk_m_worklet_contourtree_augmented_active_graph_initialize_active_graph_vertices_h
63 namespace contourtree_augmented
65 namespace active_graph_inc
74 WholeArrayIn outDegrees,
75 WholeArrayIn inverseIndex,
77 WholeArrayOut activeIndices,
78 WholeArrayOut globalIndex,
79 WholeArrayOut outdegree,
80 WholeArrayOut hyperarcs,
81 WholeArrayOut activeVertices);
89 template <
typename InFieldPortalType,
typename OutFieldPortalType>
91 const InFieldPortalType& outDegrees,
92 const InFieldPortalType& inverseIndex,
93 const InFieldPortalType& extrema,
95 const OutFieldPortalType& activeIndices,
96 const OutFieldPortalType& globalIndex,
97 const OutFieldPortalType& outdegree,
98 const OutFieldPortalType& hyperarcs,
99 const OutFieldPortalType& activeVertices)
const
101 if (outDegrees.Get(sortIndex) != 1)
103 vtkm::Id activeIndex = inverseIndex.Get(sortIndex);
105 activeIndices.Set(sortIndex, activeIndex);
107 globalIndex.Set(activeIndex, sortIndex);
109 outdegree.Set(activeIndex, outDegrees.Get(sortIndex));
111 hyperarcs.Set(activeIndex,
MaskedIndex(extrema.Get(sortIndex)));
113 activeVertices.Set(activeIndex, activeIndex);