vcg::DisjointSet< OBJECT_TYPE > Class Template Reference

#include <disjoint_set.h>

List of all members.

Classes

struct  DisjointSetNode
struct  SimpleObjHashFunc

Public Member Functions

 DisjointSet ()
OBJECT_TYPE * FindSet (OBJECT_TYPE *x)
void MakeSet (OBJECT_TYPE *x)
void Union (OBJECT_TYPE *x, OBJECT_TYPE *y)

Protected Attributes

std::vector< DisjointSetNodenodes

Private Types

typedef std::pair< hIterator,
bool > 
hInsertResult
typedef STDEXT::hash_map
< ObjectPointer, int,
SimpleObjHashFunc >::iterator 
hIterator
typedef std::pair
< ObjectPointer, int > 
hPair
typedef OBJECT_TYPE * ObjectPointer

Private Member Functions

void Link (OBJECT_TYPE *x, OBJECT_TYPE *y)

Private Attributes

STDEXT::hash_map< OBJECT_TYPE
*, int, SimpleObjHashFunc
inserted_objects

Detailed Description

template<class OBJECT_TYPE>
class vcg::DisjointSet< OBJECT_TYPE >

Given a set of elements, it is often useful to break them up or partition them into a number of separate, nonoverlapping groups. A disjoint-set data structure is a data structure that keeps track of such a partitioning. See Diskoint-set data structure on Wikipedia for more details.

Definition at line 66 of file disjoint_set.h.


Member Typedef Documentation

template<class OBJECT_TYPE >
typedef std::pair< hIterator, bool > vcg::DisjointSet< OBJECT_TYPE >::hInsertResult [private]

Definition at line 94 of file disjoint_set.h.

template<class OBJECT_TYPE >
typedef STDEXT::hash_map< ObjectPointer, int, SimpleObjHashFunc >::iterator vcg::DisjointSet< OBJECT_TYPE >::hIterator [private]

Definition at line 91 of file disjoint_set.h.

template<class OBJECT_TYPE >
typedef std::pair< ObjectPointer, int > vcg::DisjointSet< OBJECT_TYPE >::hPair [private]

Definition at line 80 of file disjoint_set.h.

template<class OBJECT_TYPE >
typedef OBJECT_TYPE* vcg::DisjointSet< OBJECT_TYPE >::ObjectPointer [private]

Definition at line 79 of file disjoint_set.h.


Constructor & Destructor Documentation

template<class OBJECT_TYPE >
vcg::DisjointSet< OBJECT_TYPE >::DisjointSet (  )  [inline]

Default constructor

Definition at line 105 of file disjoint_set.h.


Member Function Documentation

template<class OBJECT_TYPE >
OBJECT_TYPE* vcg::DisjointSet< OBJECT_TYPE >::FindSet ( OBJECT_TYPE *  x  )  [inline]

Determine which group a particular element is in.

Definition at line 131 of file disjoint_set.h.

template<class OBJECT_TYPE >
void vcg::DisjointSet< OBJECT_TYPE >::Link ( OBJECT_TYPE *  x,
OBJECT_TYPE *  y 
) [inline, private]

Definition at line 144 of file disjoint_set.h.

template<class OBJECT_TYPE >
void vcg::DisjointSet< OBJECT_TYPE >::MakeSet ( OBJECT_TYPE *  x  )  [inline]

Makes a group containing only a given element (a singleton).

Definition at line 110 of file disjoint_set.h.

template<class OBJECT_TYPE >
void vcg::DisjointSet< OBJECT_TYPE >::Union ( OBJECT_TYPE *  x,
OBJECT_TYPE *  y 
) [inline]

Combine or merge two groups into a single group.

Definition at line 121 of file disjoint_set.h.


Member Data Documentation

template<class OBJECT_TYPE >
STDEXT::hash_map< OBJECT_TYPE*, int, SimpleObjHashFunc > vcg::DisjointSet< OBJECT_TYPE >::inserted_objects [private]

Definition at line 90 of file disjoint_set.h.

template<class OBJECT_TYPE >
std::vector< DisjointSetNode > vcg::DisjointSet< OBJECT_TYPE >::nodes [protected]

Definition at line 162 of file disjoint_set.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


vcglib
Author(s): Christian Bersch
autogenerated on Fri Jan 11 09:22:59 2013