gfsmArcIndex.h
Go to the documentation of this file.
1 
2 /*=============================================================================*\
3  * File: gfsmArcIndex.h
4  * Author: Bryan Jurish <moocow.bovine@gmail.com>
5  * Description: finite state machine library: arc indices
6  *
7  * Copyright (c) 2006-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 3 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 _GFSM_ARCINDEX_H
29 #define _GFSM_ARCINDEX_H
30 
31 #include <gfsmArcIter.h>
32 
33 /*======================================================================
34  * ReverseArcIndex
35  */
37 
38 
40 
49 typedef GPtrArray gfsmReverseArcIndex;
50 
57 
64 
76 
78 #define gfsm_automaton_reverse_arc_index gfsm_automaton_to_reverse_arc_index
79 
86 void gfsm_reverse_arc_index_free(gfsmReverseArcIndex *rarcs, gboolean free_lists);
87 
89 
90 
91 /*======================================================================
92  * gfsmFinalWeightIndex
93  */
95 
96 
98 typedef GArray gfsmWeightVector;
99 
106 
113 
117 
121 
122 
125 void gfsm_weight_vector_resize(gfsmWeightVector *wv, guint size);
126 
135 
139 
147 
155 
157 
158 /*======================================================================
159  * gfsmArcTable
160  */
162 
163 
165 typedef GArray gfsmArcTable;
166 
170 
174 
177 void gfsm_arc_table_resize(gfsmArcTable *tab, guint n_arcs);
178 
182 
186 
190 
202 
214 
227 
241 
242 
245 void gfsm_arc_table_sort_with_data(gfsmArcTable *tab, GCompareDataFunc compare_func, gpointer data);
246 
250 
257 gfsmArc *gfsm_arc_table_seek(gfsmArcTable *tab, const gfsmArc *key, GCompareDataFunc compare_func, gpointer data);
258 
266 
274 
282 
284 
285 /*======================================================================
286  * gfsmArcPTable
287  */
289 
290 
292 typedef GPtrArray gfsmArcPtrTable;
293 
297 
301 
304 void gfsm_arc_ptr_table_resize(gfsmArcPtrTable *ptab, guint n_arcs);
305 
309 
313 
317 
329 
342 
356 
357 
360 void gfsm_arc_ptr_table_sort_with_data(gfsmArcPtrTable *ptab, GCompareDataFunc compare_func, gpointer data);
361 
365 
372 gfsmArc *gfsm_arc_ptr_table_seek(gfsmArcPtrTable *ptab, const gfsmArc *key, GCompareDataFunc compare_func, gpointer data);
373 
382 
383 /*======================================================================
384  * gfsmArcTableIndex
385  */
387 
388 
390 typedef struct {
392  GPtrArray *first;
394 
398 
402 
405 void gfsm_arc_table_index_resize(gfsmArcTableIndex *tab, gfsmStateId n_states, guint n_arcs);
406 
410 
414 
417 
421 
425 
437 
439 void gfsm_arc_table_index_sort_with_data(gfsmArcTableIndex *tabx, GCompareDataFunc compare_func, gpointer data);
440 
446 
450 
458 
466 
468 
469 /*======================================================================
470  * gfsmArcRange
471  */
473 
474 
476 typedef struct {
479 } gfsmArcRange;
480 
484 
487 void gfsm_arcrange_close(gfsmArcRange *range);
488 
491 gboolean gfsm_arcrange_ok(gfsmArcRange *range);
492 
496 
499 void gfsm_arcrange_next(gfsmArcRange *range);
500 
502 
503 /*======================================================================
504  * inline definitions
505  */
506 #ifdef GFSM_INLINE_ENABLED
507 # include <gfsmArcIndex.hi>
508 #endif
509 
510 /*======================================================================
511  * END
512  */
513 #endif /* _GFSM_ARCINDEX_H */