spot  1.2.1a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
spot::union_find Class Reference

#include <fasttgbaalgos/ec/union_find.hh>

Inheritance diagram for spot::union_find:
Inheritance graph
Collaboration diagram for spot::union_find:
Collaboration graph

Public Types

enum  color { Alive, Dead, Unknown }
 The color for a new State. More...
 

Public Member Functions

 union_find (acc_dict &acc)
 The constructor for the Union-Find structure acc the acceptance dictionary. More...
 
virtual ~union_find ()
 A simple destructor. More...
 
virtual bool add (const fasttgba_state *s)
 Add a partition that contains only s Suppose a clone() has been done and the union-find is in charge to perform the destroy() More...
 
virtual void unite (const fasttgba_state *left, const fasttgba_state *right)
 Perform the union of the two partition containing left and right. No assumptions over the resulting parent can be do. More...
 
virtual bool same_partition (const fasttgba_state *left, const fasttgba_state *right)
 Return true if the partition of left is the same that the partition of right. More...
 
virtual void add_acc (const fasttgba_state *s, markset m)
 Add the acceptance set to the partition that contains the state s. More...
 
virtual markset get_acc (const fasttgba_state *s)
 return the acceptance set of the partition containing s More...
 
virtual bool contains (const fasttgba_state *s)
 Return wether a state belong to the Union-Find structure. More...
 
virtual void make_dead (const fasttgba_state *s)
 perform a union with dead More...
 
virtual bool is_dead (const fasttgba_state *s)
 check wether the root of the set containing this scc is dead. More...
 
virtual color get_color (const fasttgba_state *)
 
virtual int max_alive ()
 
virtual int max_dead ()
 
virtual unsigned int size ()
 The current size of the union find. More...
 
virtual unsigned int dead_size ()
 

Protected Types

typedef Sgi::hash_map< const
fasttgba_state *, int,
fasttgba_state_ptr_hash,
fasttgba_state_ptr_equal
uf_map
 

Protected Member Functions

virtual int root (int i)
 grab the id of the root associated to an element. More...
 

Protected Attributes

uf_map el
 the structure used to the storage An element is associated to an integer More...
 
std::vector< int > idneg
 For each element store the id of the parent. More...
 
std::vector< markset * > accp
 Acceptance associated to each element. More...
 
acc_dictacc_
 The acceptance dictionary. More...
 
markset empty
 Avoid to re-create some elements. More...
 

Detailed Description

This class is a wrapper for manipulating Union Find structure in emptiness check algotithms

It's an efficient data structure to compute SCC In order to be efficient, some methods are added to impove the efficience of emptiness check algorithm

Performing operation with a state == 0 will be analysed as an operation with a dead state cf cou99_uf

Member Enumeration Documentation

The color for a new State.

Constructor & Destructor Documentation

spot::union_find::union_find ( acc_dict acc)

The constructor for the Union-Find structure acc the acceptance dictionary.

virtual spot::union_find::~union_find ( )
virtual

A simple destructor.

Member Function Documentation

virtual bool spot::union_find::add ( const fasttgba_state s)
virtual

Add a partition that contains only s Suppose a clone() has been done and the union-find is in charge to perform the destroy()

Reimplemented in spot::setOfDisjointSetsIPC_LRPC_MS_Dead, spot::setOfDisjointSetsIPC_LRPC_MS, and spot::setOfDisjointSetsIPC_LRPC.

virtual void spot::union_find::add_acc ( const fasttgba_state s,
markset  m 
)
virtual

Add the acceptance set to the partition that contains the state s.

Reimplemented in spot::setOfDisjointSetsIPC_LRPC_MS_Dead, spot::setOfDisjointSetsIPC_LRPC_MS, and spot::setOfDisjointSetsIPC_LRPC.

virtual bool spot::union_find::contains ( const fasttgba_state s)
virtual

Return wether a state belong to the Union-Find structure.

Reimplemented in spot::setOfDisjointSetsIPC_LRPC_MS_Dead, spot::setOfDisjointSetsIPC_LRPC_MS, and spot::setOfDisjointSetsIPC_LRPC.

virtual markset spot::union_find::get_acc ( const fasttgba_state s)
virtual

return the acceptance set of the partition containing s

Reimplemented in spot::setOfDisjointSetsIPC_LRPC_MS_Dead, spot::setOfDisjointSetsIPC_LRPC_MS, and spot::setOfDisjointSetsIPC_LRPC.

virtual bool spot::union_find::is_dead ( const fasttgba_state s)
virtual

check wether the root of the set containing this scc is dead.

Reimplemented in spot::setOfDisjointSetsIPC_LRPC_MS_Dead, spot::setOfDisjointSetsIPC_LRPC_MS, and spot::setOfDisjointSetsIPC_LRPC.

virtual void spot::union_find::make_dead ( const fasttgba_state s)
virtual
virtual int spot::union_find::max_alive ( )
virtual

The size of alive elements i-e elements stored in the union find.

Reimplemented in spot::setOfDisjointSetsIPC_LRPC_MS_Dead, spot::setOfDisjointSetsIPC_LRPC_MS, and spot::setOfDisjointSetsIPC_LRPC.

virtual int spot::union_find::max_dead ( )
virtual

The size of dead elements i-e elements stored outside the union find

Reimplemented in spot::setOfDisjointSetsIPC_LRPC_MS_Dead, spot::setOfDisjointSetsIPC_LRPC_MS, and spot::setOfDisjointSetsIPC_LRPC.

virtual int spot::union_find::root ( int  i)
protectedvirtual

grab the id of the root associated to an element.

virtual bool spot::union_find::same_partition ( const fasttgba_state left,
const fasttgba_state right 
)
virtual

Return true if the partition of left is the same that the partition of right.

Reimplemented in spot::setOfDisjointSetsIPC_LRPC_MS_Dead, spot::setOfDisjointSetsIPC_LRPC_MS, and spot::setOfDisjointSetsIPC_LRPC.

virtual unsigned int spot::union_find::size ( )
virtual
virtual void spot::union_find::unite ( const fasttgba_state left,
const fasttgba_state right 
)
virtual

Perform the union of the two partition containing left and right. No assumptions over the resulting parent can be do.

Reimplemented in spot::setOfDisjointSetsIPC_LRPC_MS_Dead, spot::setOfDisjointSetsIPC_LRPC_MS, and spot::setOfDisjointSetsIPC_LRPC.

Member Data Documentation

acc_dict& spot::union_find::acc_
protected

The acceptance dictionary.

std::vector<markset *> spot::union_find::accp
protected

Acceptance associated to each element.

uf_map spot::union_find::el
protected

the structure used to the storage An element is associated to an integer

markset spot::union_find::empty
protected

Avoid to re-create some elements.

std::vector<int> spot::union_find::idneg
protected

For each element store the id of the parent.


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

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Tue Jan 21 2014 16:52:02 for spot by doxygen 1.8.5