changeset 588:32415069ede0

bwlabeln.cc: Add a few comments about the union-find data structure.
author jordigh
date Fri, 07 Sep 2012 15:24:49 +0000
parents 65d8b954e26f
children 31736083c9a5
files src/bwlabeln.cc src/union-find.h++
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/bwlabeln.cc
+++ b/src/bwlabeln.cc
@@ -282,6 +282,9 @@
 the pixel belong to object number 2, etc. The total number of objects\n\
 is @var{num}.\n\
 \n\
+The algorithm used is a disjoint-set data structure, a.k.a. union-find.\n\
+See, for example, http://en.wikipedia.org/wiki/Union-find\n\
+\n\
 @seealso{bwconncomp, bwlabel, regionprops}\n\
 @end deftypefn\n\
 ")
--- a/src/union-find.h++
+++ b/src/union-find.h++
@@ -24,6 +24,8 @@
 
 class union_find
 {
+  // Union-find data structure, see e.g.
+  // http://en.wikipedia.org/wiki/Union-find
 
 private:
   std::vector<voxel*> voxels;