gfsmEncode.h
Go to the documentation of this file.
1 
2 /*=============================================================================*\
3  * File: gfsmEncode.h
4  * Author: Bryan Jurish <moocow.bovine@gmail.com>
5  * Description: finite state machine library: debugging
6  *
7  * Copyright (c) 2014 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_ENCODE_H
29 #define _GFSM_ENCODE_H
30 
31 #include <gfsmAutomaton.h>
32 #include <gfsmAlphabet.h>
33 
34 
35 /*======================================================================
36  * Types
37  */
39 
40 
42 typedef struct {
46 } gfsmArcLabel;
47 
51 
53 
54 /*======================================================================
55  * gfsmArcLabel: Methods
56  */
58 
59 
63 
67 
71 
75 
78 
80 guint gfsm_arclabel_equal(const gfsmArcLabel *al1, const gfsmArcLabel *al2);
81 
83 
84 /*======================================================================
85  * gfsmArcLabelKey
86  */
88 
89 
95 
97 #define gfsm_arclabel_key_clear gfsm_alphabet_clear
98 
100 #define gfsm_arclabel_key_free gfsm_alphabet_free
101 
108 
115 
117 
118 /*======================================================================
119  * Top-Level Methods
120  */
122 
123 
131 gfsmArcLabelKey *gfsm_automaton_encode(gfsmAutomaton *fsm, gfsmArcLabelKey *key, gboolean encode_labels, gboolean encode_weights);
132 
140 gfsmAutomaton *gfsm_automaton_decode(gfsmAutomaton *fsm, gfsmArcLabelKey *key, gboolean encode_labels, gboolean encode_weights);
141 
143 
144 //-- inline definitions
145 #ifdef GFSM_INLINE_ENABLED
146 # include <gfsmEncode.hi>
147 #endif
148 
149 #endif /* _GFSM_ENCODE_H */