spot
1.2.1a
|
#include <fasttgbaalgos/ec/union_find.hh>
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_dict & | acc_ |
The acceptance dictionary. More... | |
markset | empty |
Avoid to re-create some elements. More... | |
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
The color for a new State.
spot::union_find::union_find | ( | acc_dict & | acc | ) |
The constructor for the Union-Find structure acc the acceptance dictionary.
|
virtual |
A simple destructor.
|
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 |
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 |
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 |
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 |
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 |
perform a union with dead
Reimplemented in spot::setOfDisjointSetsIPC_LRPC_MS_Dead, spot::setOfDisjointSetsIPC_LRPC_MS, and spot::setOfDisjointSetsIPC_LRPC.
|
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 |
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.
|
protectedvirtual |
grab the id of the root associated to an element.
|
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 |
The current size of the union find.
Reimplemented in spot::setOfDisjointSetsIPC_LRPC_MS_Dead, spot::setOfDisjointSetsIPC_LRPC_MS, and spot::setOfDisjointSetsIPC_LRPC.
|
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.
|
protected |
The acceptance dictionary.
|
protected |
Acceptance associated to each element.
|
protected |
the structure used to the storage An element is associated to an integer
|
protected |
Avoid to re-create some elements.
|
protected |
For each element store the id of the parent.