.TH "mlpack::emst::UnionFind" 3 "Tue Sep 9 2014" "Version 1.0.10" "MLPACK" \" -*- nroff -*- .ad l .nh .SH NAME mlpack::emst::UnionFind \- .PP A Union-Find data structure\&. .SH SYNOPSIS .br .PP .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBUnionFind\fP (const size_t size)" .br .RI "\fIConstruct the object with the given size\&. \fP" .ti -1c .RI "\fB~UnionFind\fP ()" .br .RI "\fIDestroy the object (nothing to do)\&. \fP" .ti -1c .RI "size_t \fBFind\fP (const size_t x)" .br .RI "\fIReturns the component containing an element\&. \fP" .ti -1c .RI "void \fBUnion\fP (const size_t x, const size_t y)" .br .RI "\fIUnion the components containing x and y\&. \fP" .in -1c .SS "Private Attributes" .in +1c .ti -1c .RI "arma::Col< size_t > \fBparent\fP" .br .ti -1c .RI "arma::ivec \fBrank\fP" .br .in -1c .SH "Detailed Description" .PP A Union-Find data structure\&. See Cormen, Rivest, & Stein for details\&. The structure tracks the components of a graph\&. Each point in the graph is initially in its own component\&. Calling Union(x, y) unites the components indexed by x and y\&. Find(x) returns the index of the component containing point x\&. .PP Definition at line 40 of file union_find\&.hpp\&. .SH "Constructor & Destructor Documentation" .PP .SS "mlpack::emst::UnionFind::UnionFind (const size_tsize)\fC [inline]\fP" .PP Construct the object with the given size\&. .PP Definition at line 48 of file union_find\&.hpp\&. .PP References parent, and rank\&. .SS "mlpack::emst::UnionFind::~UnionFind ()\fC [inline]\fP" .PP Destroy the object (nothing to do)\&. .PP Definition at line 58 of file union_find\&.hpp\&. .SH "Member Function Documentation" .PP .SS "size_t mlpack::emst::UnionFind::Find (const size_tx)\fC [inline]\fP" .PP Returns the component containing an element\&. .PP \fBParameters:\fP .RS 4 \fIx\fP the component to be found .RE .PP \fBReturns:\fP .RS 4 The index of the component containing x .RE .PP .PP Definition at line 66 of file union_find\&.hpp\&. .PP References parent\&. .PP Referenced by Union()\&. .SS "void mlpack::emst::UnionFind::Union (const size_tx, const size_ty)\fC [inline]\fP" .PP Union the components containing x and y\&. .PP \fBParameters:\fP .RS 4 \fIx\fP one component .br \fIy\fP the other component .RE .PP .PP Definition at line 86 of file union_find\&.hpp\&. .PP References Find(), parent, and rank\&. .SH "Member Data Documentation" .PP .SS "arma::Col mlpack::emst::UnionFind::parent\fC [private]\fP" .PP Definition at line 43 of file union_find\&.hpp\&. .PP Referenced by Find(), Union(), and UnionFind()\&. .SS "arma::ivec mlpack::emst::UnionFind::rank\fC [private]\fP" .PP Definition at line 44 of file union_find\&.hpp\&. .PP Referenced by Union(), and UnionFind()\&. .SH "Author" .PP Generated automatically by Doxygen for MLPACK from the source code\&.