gfsmArith.h
Go to the documentation of this file.
1 
2 /*=============================================================================*\
3  * File: gfsmArith.h
4  * Author: Bryan Jurish <moocow.bovine@gmail.com>
5  * Description: finite state machine library
6  *
7  * Copyright (c) 2005-2007 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 
24 #ifndef _GFSM_ARITH_H
25 #define _GFSM_ARITH_H
26 
27 #include <gfsmAutomaton.h>
28 
33 /*======================================================================
34  * Types
35  */
37 typedef enum {
38  //-- real ops
45  //-- semiring ops
49 } gfsmArithOp;
50 
52 typedef struct {
56  gboolean do_zero;
58 
59 
60 /*======================================================================
61  * Methods: arithmetic: generic
62  */
64 
65 
66 //------------------------------
82  gfsmArithOp op,
83  gfsmWeight arg,
84  gfsmLabelVal lo,
85  gfsmLabelVal hi,
86  gboolean do_arcs,
87  gboolean do_final,
88  gboolean do_zero);
89 
90 //------------------------------
107  gfsmStateId qid,
108  gfsmArithOp op,
109  gfsmWeight arg,
110  gfsmLabelVal lo,
111  gfsmLabelVal hi,
112  gboolean do_arcs,
113  gboolean do_final,
114  gboolean do_zero);
115 
116 
117 //------------------------------
122  gfsmArithOp op,
123  gfsmWeight arg,
124  gboolean do_zero);
125 
126 //------------------------------
131  gfsmArithOp op,
132  gfsmWeight w1,
133  gfsmWeight w2,
134  gboolean do_zero);
135 
137 #endif /* _GFSM_ARITH_H */