spot
1.2.6
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
tgbaalgos
gtec
nsheap.hh
1
// -*- coding: utf-8 -*-
2
// Copyright (C) 2013 Laboratoire de Recherche et Development de
3
// l'Epita (LRDE).
4
// Copyright (C) 2004, 2006 Laboratoire d'Informatique de Paris 6 (LIP6),
5
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
6
// et Marie Curie.
7
//
8
// This file is part of Spot, a model checking library.
9
//
10
// Spot is free software; you can redistribute it and/or modify it
11
// under the terms of the GNU General Public License as published by
12
// the Free Software Foundation; either version 3 of the License, or
13
// (at your option) any later version.
14
//
15
// Spot is distributed in the hope that it will be useful, but WITHOUT
16
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
18
// License for more details.
19
//
20
// You should have received a copy of the GNU General Public License
21
// along with this program. If not, see <http://www.gnu.org/licenses/>.
22
23
#ifndef SPOT_TGBAALGOS_GTEC_NSHEAP_HH
24
# define SPOT_TGBAALGOS_GTEC_NSHEAP_HH
25
26
# include "tgba/state.hh"
27
# include "misc/hash.hh"
28
29
namespace
spot
30
{
32
class
SPOT_API
numbered_state_heap_const_iterator
33
{
34
public
:
35
virtual
~
numbered_state_heap_const_iterator
() {}
36
38
virtual
void
first() = 0;
40
virtual
void
next() = 0;
41
virtual
bool
done()
const
= 0;
43
45
virtual
const
state
* get_state()
const
= 0;
47
virtual
int
get_index()
const
= 0;
49
};
50
52
class
SPOT_API
numbered_state_heap
53
{
54
public
:
55
typedef
std::pair<const state*, int*> state_index_p;
56
typedef
std::pair<const state*, int> state_index;
57
58
virtual
~
numbered_state_heap
() {}
60
virtual
state_index find(
const
state
* s)
const
= 0;
75
virtual
state_index_p find(
const
state
* s) = 0;
77
79
virtual
state_index index(
const
state
* s)
const
= 0;
87
virtual
state_index_p index(
const
state
* s) = 0;
89
91
virtual
void
insert(
const
state
* s,
int
index) = 0;
92
94
virtual
int
size()
const
= 0;
95
97
virtual
numbered_state_heap_const_iterator
* iterator()
const
= 0;
98
};
99
101
class
SPOT_API
numbered_state_heap_factory
102
{
103
public
:
104
virtual
~
numbered_state_heap_factory
() {}
105
virtual
numbered_state_heap
* build()
const
= 0;
106
};
107
109
class
SPOT_API
numbered_state_heap_hash_map
:
public
numbered_state_heap
110
{
111
public
:
112
virtual
~
numbered_state_heap_hash_map
();
113
114
virtual
state_index find(
const
state
* s)
const
;
115
virtual
state_index_p find(
const
state
* s);
116
virtual
state_index index(
const
state
* s)
const
;
117
virtual
state_index_p index(
const
state
* s);
118
119
virtual
void
insert(
const
state
* s,
int
index);
120
virtual
int
size()
const
;
121
122
virtual
numbered_state_heap_const_iterator
* iterator()
const
;
123
124
typedef
Sgi::hash_map<
const
state
*, int,
125
state_ptr_hash
,
state_ptr_equal
> hash_type;
126
protected
:
127
hash_type
h
;
128
};
129
133
class
SPOT_API
numbered_state_heap_hash_map_factory
:
134
public
numbered_state_heap_factory
135
{
136
public
:
137
virtual
numbered_state_heap_hash_map
* build()
const
;
138
140
static
const
numbered_state_heap_hash_map_factory
* instance();
141
protected
:
142
virtual
~
numbered_state_heap_hash_map_factory
() {}
143
numbered_state_heap_hash_map_factory
();
144
};
145
146
}
147
148
#endif // SPOT_TGBAALGOS_GTEC_NSHEAP_HH
Please direct any
question
,
comment
, or
bug report
to the Spot mailing list at
spot@lrde.epita.fr
.
Generated on Sat Dec 6 2014 12:28:44 for spot by
1.8.4