Public Types | Public Member Functions | Private Attributes

cmtk::UnionFind< T > Class Template Reference
[cmtkBase Library]

Class template for (relatively) efficient union-find algorithm. More...

#include <cmtkUnionFind.h>

Collaboration diagram for cmtk::UnionFind< T >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::set< T > SetType
 Internal set type.
typedef std::list< SetTypeListType
 Internal list type.
typedef ListType::iterator FindResultType
 Opqaue result of "find" operation.

Public Member Functions

FindResultType Find (const T &key)
 Find operation.
const T FindKey (const T &key)
 Find representative key.
FindResultType End ()
 End-of-list iterator.
void Union (const FindResultType &s1, const FindResultType &s2)
 Union operation.
void Insert (const T &key)
 Insert a new key by itself.

Private Attributes

ListType m_List
 The list of sets.

Detailed Description

template<class T>
class cmtk::UnionFind< T >

Class template for (relatively) efficient union-find algorithm.

Definition at line 48 of file cmtkUnionFind.h.


Member Typedef Documentation

template<class T>
typedef ListType::iterator cmtk::UnionFind< T >::FindResultType

Opqaue result of "find" operation.

Definition at line 58 of file cmtkUnionFind.h.

template<class T>
typedef std::list<SetType> cmtk::UnionFind< T >::ListType

Internal list type.

Definition at line 55 of file cmtkUnionFind.h.

template<class T>
typedef std::set<T> cmtk::UnionFind< T >::SetType

Internal set type.

Definition at line 52 of file cmtkUnionFind.h.


Member Function Documentation

template<class T>
FindResultType cmtk::UnionFind< T >::End (  ) [inline]

End-of-list iterator.

Definition at line 78 of file cmtkUnionFind.h.

template<class T>
FindResultType cmtk::UnionFind< T >::Find ( const T &  key ) [inline]

Find operation.

Definition at line 61 of file cmtkUnionFind.h.

Referenced by cmtk::DataGridMorphologicalOperators::GetBinaryConnectedComponents().

template<class T>
const T cmtk::UnionFind< T >::FindKey ( const T &  key ) [inline]

Find representative key.

Definition at line 72 of file cmtkUnionFind.h.

Referenced by cmtk::DataGridMorphologicalOperators::GetBinaryConnectedComponents().

template<class T>
void cmtk::UnionFind< T >::Insert ( const T &  key ) [inline]

Insert a new key by itself.

Definition at line 94 of file cmtkUnionFind.h.

Referenced by cmtk::DataGridMorphologicalOperators::GetBinaryConnectedComponents().

template<class T>
void cmtk::UnionFind< T >::Union ( const FindResultType s1,
const FindResultType s2 
) [inline]

Union operation.

Definition at line 84 of file cmtkUnionFind.h.

Referenced by cmtk::DataGridMorphologicalOperators::GetBinaryConnectedComponents().


Member Data Documentation

template<class T>
ListType cmtk::UnionFind< T >::m_List [private]

The list of sets.

Definition at line 103 of file cmtkUnionFind.h.


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