spot
1.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
tgbaalgos
gtec
nsheap.hh
Go to the documentation of this file.
1
// Copyright (C) 2004, 2006 Laboratoire d'Informatique de Paris 6 (LIP6),
2
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
3
// et Marie Curie.
4
//
5
// This file is part of Spot, a model checking library.
6
//
7
// Spot is free software; you can redistribute it and/or modify it
8
// under the terms of the GNU General Public License as published by
9
// the Free Software Foundation; either version 3 of the License, or
10
// (at your option) any later version.
11
//
12
// Spot is distributed in the hope that it will be useful, but WITHOUT
13
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15
// License for more details.
16
//
17
// You should have received a copy of the GNU General Public License
18
// along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20
#ifndef SPOT_TGBAALGOS_GTEC_NSHEAP_HH
21
# define SPOT_TGBAALGOS_GTEC_NSHEAP_HH
22
23
#include "
tgba/state.hh
"
24
#include "
misc/hash.hh
"
25
26
namespace
spot
27
{
29
class
numbered_state_heap_const_iterator
30
{
31
public
:
32
virtual
~numbered_state_heap_const_iterator
() {}
33
35
36
virtual
void
first
() = 0;
37
virtual
void
next
() = 0;
38
virtual
bool
done
()
const
= 0;
40
42
43
virtual
const
state
*
get_state
()
const
= 0;
44
virtual
int
get_index
()
const
= 0;
46
};
47
49
class
numbered_state_heap
50
{
51
public
:
52
typedef
std::pair<const state*, int*>
state_index_p
;
53
typedef
std::pair<const state*, int>
state_index
;
54
55
virtual
~numbered_state_heap
() {}
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
virtual
state_index
find
(
const
state
* s)
const
= 0;
72
virtual
state_index_p
find
(
const
state
* s) = 0;
74
76
77
78
79
80
81
82
83
virtual
state_index
index
(
const
state
* s)
const
= 0;
84
virtual
state_index_p
index
(
const
state
* s) = 0;
86
88
virtual
void
insert
(
const
state
* s,
int
index
) = 0;
89
91
virtual
int
size
()
const
= 0;
92
94
virtual
numbered_state_heap_const_iterator
*
iterator
()
const
= 0;
95
};
96
98
class
numbered_state_heap_factory
99
{
100
public
:
101
virtual
~numbered_state_heap_factory
() {}
102
virtual
numbered_state_heap
*
build
()
const
= 0;
103
};
104
106
class
numbered_state_heap_hash_map
:
public
numbered_state_heap
107
{
108
public
:
109
virtual
~numbered_state_heap_hash_map
();
110
111
virtual
state_index
find
(
const
state
* s)
const
;
112
virtual
state_index_p
find
(
const
state
* s);
113
virtual
state_index
index
(
const
state
* s)
const
;
114
virtual
state_index_p
index
(
const
state
* s);
115
116
virtual
void
insert
(
const
state
* s,
int
index);
117
virtual
int
size
()
const
;
118
119
virtual
numbered_state_heap_const_iterator
*
iterator
()
const
;
120
121
typedef
Sgi::hash_map
<
const
state
*, int,
122
state_ptr_hash
,
state_ptr_equal
>
hash_type
;
123
protected
:
124
hash_type
h
;
125
};
126
130
class
numbered_state_heap_hash_map_factory
:
131
public
numbered_state_heap_factory
132
{
133
public
:
134
virtual
numbered_state_heap_hash_map
*
build
()
const
;
135
137
static
const
numbered_state_heap_hash_map_factory
*
instance
();
138
protected
:
139
virtual
~numbered_state_heap_hash_map_factory
() {}
140
numbered_state_heap_hash_map_factory
();
141
};
142
143
}
144
145
#endif // SPOT_TGBAALGOS_GTEC_NSHEAP_HH
Please
comment
this page and
report errors
about it on
the RefDocComments page
.
Generated on Sat Oct 27 2012 09:34:32 for spot by
1.8.1.2