higra / Higra

Hierarchical Graph Analysis
Other
97 stars 20 forks source link

Seeded watershed performance #260

Open PerretB opened 1 year ago

PerretB commented 1 year ago

Improve efficiency of labelsitation_seeded_watersed https://github.com/higra/Higra/blob/f85538d23b0e6bc5a47f3122a74bc28be74a8efe/include/higra/algo/watershed.hpp#L124

Idea 1: sure, shortcut first loop when num_vertices - num_seeds edges have been processed (edge case, num_seeds = 0) Idea 2: to test, replace relabelling of nonlabeled vertices with union-find by a connected component labelling