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

spot::state_explicit Class Reference
[TGBA representations]

#include <tgba/tgbaexplicit.hh>

Inheritance diagram for spot::state_explicit:

Inheritance graph
[legend]
Collaboration diagram for spot::state_explicit:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 state_explicit (const tgba_explicit::state *s)
virtual int compare (const spot::state *other) const
virtual size_t hash () const
 Hash a state.
virtual state_explicitclone () const
 Duplicate a state.
virtual ~state_explicit ()
const tgba_explicit::stateget_state () const
virtual int compare (const state *other) const =0
 Compares two states (that come from the same automaton).

Private Attributes

const tgba_explicit::statestate_

Detailed Description

States used by spot::tgba_explicit.


Constructor & Destructor Documentation

spot::state_explicit::state_explicit const tgba_explicit::state s  )  [inline]
 

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


Member Function Documentation

virtual state_explicit* spot::state_explicit::clone  )  const [virtual]
 

Duplicate a state.

Implements spot::state.

virtual int spot::state::compare const state other  )  const [pure virtual, inherited]
 

Compares two states (that come from the same automaton).

This method returns an integer less than, equal to, or greater than zero if this is found, respectively, to be less than, equal to, or greater than other according to some implicit total order.

This method should not be called to compare states from different automata.

See also:
spot::state_ptr_less_than

Implemented in spot::state_bdd, and spot::state_product.

virtual int spot::state_explicit::compare const spot::state other  )  const [virtual]
 

const tgba_explicit::state* spot::state_explicit::get_state  )  const
 

virtual size_t spot::state_explicit::hash  )  const [virtual]
 

Hash a state.

This method returns an integer that can be used as a hash value for this state.

Note that the hash value is guaranteed to be unique for all equal states (in compare()'s sense) for only has long has one of these states exists. So it's OK to use a spot::state as a key in a hash_map because the mere use of the state as a key in the hash will ensure the state continues to exist.

However if you create the state, get its hash key, delete the state, recreate the same state, and get its hash key, you may obtain two different hash keys if the same state were not already used elsewhere. In practice this weird situation can occur only when the state is BDD-encoded, because BDD numbers (used to build the hash value) can be reused for other formulas. That probably doesn't matter, since the hash value is meant to be used in a hash_map, but it had to be noted.

Implements spot::state.


Member Data Documentation

const tgba_explicit::state* spot::state_explicit::state_ [private]
 


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:38 2005 for spot by doxygen 1.4.0