Loading [MathJax]/extensions/tex2jax.js
PISM, A Parallel Ice Sheet Model 2.2.1-cd005eec8 committed by Constantine Khrulev on 2025-03-07
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages

◆ resolve_labels()

static std::map< int, int > pism::details::resolve_labels ( const std::map< int, std::set< int > > &  graph,
bool  mark_isolated_patches 
)
static

Traverse the graph using a version of the "breadth first search" algorithm and find final labels for all of its nodes.

If mark_isolated_patches is true, isolated patches get labeled with 1, the rest with 0.

If mark_isolated_patches is false, each connected component in the graph gets a unique label starting from 1 and using consecutive integers.

Definition at line 192 of file label_components_parallel.cc.

Referenced by final_labels().