spot  1.2.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | List of all members
spot::numbered_state_heap Class Referenceabstract

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

#include <tgbaalgos/gtec/nsheap.hh>

Inheritance diagram for spot::numbered_state_heap:
Inheritance graph
Collaboration diagram for spot::numbered_state_heap:
Collaboration graph

Public Types

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

Public Member Functions

virtual void insert (const state *s, int index)=0
 Add a new state s with index index. More...
 
virtual int size () const =0
 The number of stored states. More...
 
virtual
numbered_state_heap_const_iterator
iterator () const =0
 Return an iterator on the states/indexes pairs. More...
 
virtual state_index find (const state *s) const =0
 Is state in the heap? More...
 
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. More...
 
virtual state_index_p index (const state *s)=0
 

Detailed Description

Keep track of a large quantity of indexed states.

Member Function Documentation

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 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 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 direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Thu May 15 2014 11:04:12 for spot by doxygen 1.8.4