OpenADFortTk (including Open64 and OpenAnalysis references)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
OA::UnionFindUniverse Class Reference

#include <UnionFindUniverse.hpp>

Collaboration diagram for OA::UnionFindUniverse:
Collaboration graph

Public Member Functions

 UnionFindUniverse (unsigned int highWaterMark)
 
 ~UnionFindUniverse ()
 
void Union (int i, int j, int k)
 
int Find (int i)
 returns what set i is in More...
 

Private Member Functions

int & Count (int i)
 
int & Root (int i)
 
int & Parent (int i)
 
int & Name (int i)
 
int do_FIND (int i)
 

Private Attributes

UnionFindElemente
 

Detailed Description

Here is example usage of this class:

OA::UnionFindUniverse ufset(10);

ufset.Union( ufset.Find(1), ufset.Find(5), ufset.Find(5) )

Definition at line 31 of file UnionFindUniverse.hpp.

Constructor & Destructor Documentation

OA::UnionFindUniverse::UnionFindUniverse ( unsigned int  highWaterMark)

Definition at line 62 of file UnionFindUniverse.cpp.

References e, and OA::UnionFindElement::Init().

Here is the call graph for this function:

OA::UnionFindUniverse::~UnionFindUniverse ( )

Definition at line 71 of file UnionFindUniverse.cpp.

References e.

Member Function Documentation

int & OA::UnionFindUniverse::Count ( int  i)
private

Definition at line 125 of file UnionFindUniverse.cpp.

References OA::UnionFindElement::Count(), and e.

Referenced by Union().

Here is the call graph for this function:

int OA::UnionFindUniverse::do_FIND ( int  i)
private

Definition at line 115 of file UnionFindUniverse.cpp.

References Parent(), and UF_NIL.

Referenced by Find().

Here is the call graph for this function:

int OA::UnionFindUniverse::Find ( int  i)

returns what set i is in

Definition at line 78 of file UnionFindUniverse.cpp.

References do_FIND(), Name(), Parent(), and UF_NIL.

Referenced by OA::NestedSCR::FIND().

Here is the call graph for this function:

int & OA::UnionFindUniverse::Name ( int  i)
private

Definition at line 139 of file UnionFindUniverse.cpp.

References e, and OA::UnionFindElement::Name().

Referenced by Find(), and Union().

Here is the call graph for this function:

int & OA::UnionFindUniverse::Parent ( int  i)
private

Definition at line 134 of file UnionFindUniverse.cpp.

References e, and OA::UnionFindElement::Parent().

Referenced by do_FIND(), Find(), and Union().

Here is the call graph for this function:

int & OA::UnionFindUniverse::Root ( int  i)
private

Definition at line 130 of file UnionFindUniverse.cpp.

References e, and OA::UnionFindElement::Root().

Referenced by Union().

Here is the call graph for this function:

void OA::UnionFindUniverse::Union ( int  i,
int  j,
int  k 
)

merge set i with set j and name it k if you want to merge the sets that a and b are in then you need to call Union( Find(a), Find(b), ...)

Definition at line 89 of file UnionFindUniverse.cpp.

References Count(), Name(), Parent(), and Root().

Referenced by OA::NestedSCR::UNION().

Here is the call graph for this function:

Member Data Documentation

UnionFindElement* OA::UnionFindUniverse::e
private

Definition at line 50 of file UnionFindUniverse.hpp.

Referenced by Count(), Name(), Parent(), Root(), UnionFindUniverse(), and ~UnionFindUniverse().


The documentation for this class was generated from the following files: