Main Page
Data Structures
Files
File List
Globals
src
libgfsmxl
gfsmxlLabelIndex.h
Go to the documentation of this file.
1
2
/*=============================================================================*\
3
* File: gfsmxlLabelIndex.h
4
* Author: Bryan Jurish <moocow.bovine@gmail.com>
5
* Description: finite state machine library: label index
6
*
7
* Copyright (c) 2007-2011 Bryan Jurish.
8
*
9
* This library is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU Lesser General Public
11
* License as published by the Free Software Foundation; either
12
* version 2.1 of the License, or (at your option) any later version.
13
*
14
* This library is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
* Lesser General Public License for more details.
18
*
19
* You should have received a copy of the GNU Lesser General Public
20
* License along with this library; if not, write to the Free Software
21
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
*=============================================================================*/
23
28
#ifndef _GFSMXL_LABEL_INDEX_H
29
#define _GFSMXL_LABEL_INDEX_H
30
31
#include <
gfsm.h
>
32
33
/*======================================================================
34
* gfsmxlArcPtrArray
35
*/
37
38
44
typedef
GPtrArray
gfsmxlArcPtrArray
;
45
49
gfsmxlArcPtrArray
*
gfsmxl_arc_ptr_array_new_lower
(
gfsmIndexedAutomaton
*xfsm);
50
52
GFSM_INLINE
53
void
gfsmxl_arc_ptr_array_free
(
gfsmxlArcPtrArray
*apa);
54
56
57
/*======================================================================
58
* gfsmxlArcBlockIndex
59
*/
61
62
68
typedef
struct
{
69
gfsmxlArcPtrArray
*
blocks
;
70
GPtrArray *
q2block
;
71
}
gfsmxlArcBlockIndex
;
72
76
gfsmxlArcBlockIndex
*
gfsmxl_arc_block_index_new_lower
(
gfsmIndexedAutomaton
*xfsm);
77
79
GFSM_INLINE
80
void
gfsmxl_arc_block_index_free
(
gfsmxlArcBlockIndex
*abx);
81
83
GFSM_INLINE
84
void
gfsmxl_arcrange_open_block_index
(
gfsmArcRange
*range,
gfsmxlArcBlockIndex
*abx,
gfsmStateId
qid,
gfsmLabelId
lo);
85
87
GFSM_INLINE
88
void
gfsmxl_arcrange_open_block_index_bsearch
(
gfsmArcRange
*range,
gfsmxlArcBlockIndex
*abx,
gfsmStateId
qid,
gfsmLabelId
lo);
89
91
92
/*======================================================================
93
* gfsmxlArcBlockHash
94
*/
96
97
99
typedef
struct
{
100
gfsmStateId
qid
;
101
gfsmLabelId
lab
;
102
}
gfsmxlStateLabelPair
;
103
108
typedef
GHashTable
gfsmxlArcBlockHash
;
109
111
guint
gfsmxl_state_label_pair_hash
(
const
gfsmxlStateLabelPair
*slp);
112
114
gboolean
gfsmxl_state_label_pair_equal
(
const
gfsmxlStateLabelPair
*slp1,
const
gfsmxlStateLabelPair
*slp2);
115
117
GFSM_INLINE
118
gfsmxlStateLabelPair
*
gfsmxl_state_label_pair_new
(
gfsmStateId
qid,
gfsmLabelId
lab);
119
121
GFSM_INLINE
122
void
gfsmxl_state_label_pair_free
(
gfsmxlStateLabelPair
*slp);
123
127
gfsmxlArcBlockHash
*
gfsmxl_arc_block_hash_new_lower
(
gfsmIndexedAutomaton
*xfsm);
128
130
GFSM_INLINE
131
void
gfsmxl_arc_block_hash_free
(
gfsmxlArcBlockHash
*abh);
132
134
135
//-- inline definitions
136
#ifdef GFSM_INLINE_ENABLED
137
# include <gfsmxlLabelIndex.hi>
138
#endif
139
140
#endif
/* _GFSMXL_LABEL_INDEX_H */
Generated on Mon Oct 20 2014 10:48:47 for libgfsmxl by
1.8.1.2