Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

spot::numbered_state_heap Class Reference

Keep track of a large quantity of indexed states. More...

#include <tgbaalgos/gtec/nsheap.hh>

Inheritance diagram for spot::numbered_state_heap:

Inheritance graph
[legend]
List of all members.

Public Types

typedef std::pair< const state *,
int * > 
state_index_p
typedef std::pair< const state *,
int > 
state_index

Public Member Functions

virtual ~numbered_state_heap ()
virtual void insert (const state *s, int index)=0
 Add a new state s with index index.
virtual int & index_and_insert (const state *&s)=0
 Get the index of a state, and insert that state if it is missing.
virtual int size () const =0
 The number of stored states.
virtual numbered_state_heap_const_iteratoriterator () const =0
 Return an iterator on the states/indexes pairs.
virtual state_index find (const state *s) const =0
 Is state in the heap?
virtual state_index_p find (const state *s)=0
virtual state_index index (const state *s) const =0
 Return the index of an existing state.
virtual state_index_p index (const state *s)=0

Detailed Description

Keep track of a large quantity of indexed states.


Member Typedef Documentation

typedef std::pair<const state*, int> spot::numbered_state_heap::state_index
 

typedef std::pair<const state*, int*> spot::numbered_state_heap::state_index_p
 


Constructor & Destructor Documentation

virtual spot::numbered_state_heap::~numbered_state_heap  )  [inline, virtual]
 


Member Function Documentation

virtual state_index_p spot::numbered_state_heap::find const state s  )  [pure virtual]
 

Implemented in spot::numbered_state_heap_hash_map.

virtual state_index spot::numbered_state_heap::find const state s  )  const [pure virtual]
 

Is state in the heap?

Returns a pair (0,0) if s is not in the heap. or a pair (p, i) if there is a clone p of s i in the heap with index. If s is in the heap and is different from p it will be freed.

These functions are called by the algorithm to check whether a successor is a new state to explore or an already visited state.

These functions can be redefined to search for more than an equal match. For example we could redefine it to check state inclusion.

Implemented in spot::numbered_state_heap_hash_map.

virtual state_index_p spot::numbered_state_heap::index const state s  )  [pure virtual]
 

Implemented in spot::numbered_state_heap_hash_map.

virtual state_index spot::numbered_state_heap::index const state s  )  const [pure virtual]
 

Return the index of an existing state.

This is mostly similar to find(), except it will be called for state which we know are already in the heap, or for state which may not be in the heap but for which it is always OK to do equality checks.

Implemented in spot::numbered_state_heap_hash_map.

virtual int& spot::numbered_state_heap::index_and_insert const state *&  s  )  [pure virtual]
 

Get the index of a state, and insert that state if it is missing.

If a clone of s is already in the hash table, s will be deleted and replaced by the address of the clone used.

Implemented in spot::numbered_state_heap_hash_map.

virtual void spot::numbered_state_heap::insert const state s,
int  index
[pure virtual]
 

Add a new state s with index index.

Implemented in spot::numbered_state_heap_hash_map.

virtual numbered_state_heap_const_iterator* spot::numbered_state_heap::iterator  )  const [pure virtual]
 

Return an iterator on the states/indexes pairs.

Implemented in spot::numbered_state_heap_hash_map.

virtual int spot::numbered_state_heap::size  )  const [pure virtual]
 

The number of stored states.

Implemented in spot::numbered_state_heap_hash_map.


The documentation for this class was generated from the following file:
Please comment this page and report errors about it on the RefDocComments page.
Generated on Mon Jan 31 12:55:53 2005 for spot by doxygen 1.4.0