Arc-label and/or -weight encoding utilities.
More...
#include <gfsmAutomaton.h>
#include <gfsmAlphabet.h>
#include <gfsmEncode.hi>
Go to the source code of this file.
Functions |
|
static gfsmArcLabel * | gfsm_arclabel_new (gfsmLabelVal lo, gfsmLabelVal hi, gfsmWeight w) |
static void | gfsm_arclabel_set (gfsmArcLabel *al, gfsmLabelVal lo, gfsmLabelVal hi, gfsmWeight w) |
static gfsmArcLabel * | gfsm_arclabel_clone (gfsmArcLabel *al) |
static void | gfsm_arclabel_free (gfsmArcLabel *al) |
guint | gfsm_arclabel_hash (gfsmArcLabel *al) |
guint | gfsm_arclabel_equal (const gfsmArcLabel *al1, const gfsmArcLabel *al2) |
|
gfsmArcLabelKey * | gfsm_automaton_encode (gfsmAutomaton *fsm, gfsmArcLabelKey *key, gboolean encode_labels, gboolean encode_weights) |
gfsmAutomaton * | gfsm_automaton_decode (gfsmAutomaton *fsm, gfsmArcLabelKey *key, gboolean encode_labels, gboolean encode_weights) |
Detailed Description
Macro Definition Documentation
Typedef Documentation
Function Documentation
Assign values to a ::gsfmArcLabel , like *al={lo,hi,w}
Convert a gfsmArcLabelKey to a gfsmAutomaton "key", a la fsmencode(1)
- Parameters
-
key | label-pair enumeration to be converted |
fsm | output automaton, may be passed as NULL to create a new automaton |
- Returns
- fsm representing key
Convert a gfsmAutomaton "key" to a gfsmArcLabelKey , a la fsmencode(1) in decoding mode.
- Parameters
-
fsm | input "key" automaton |
key | output label-pair enumeration, may be passed as NULL to create a new one |
- Returns
- key represented by fsm
Encode arc-labels and/or weights to a gfsmArcLabelKey
- Parameters
-
fsm | automaton to encode (destructively altered) |
key | stores label-pair enumeration, may be passed as NULL to allocate a new enum |
encode_labels | whether to encode labels |
encode_weights | whether to encode weights |
- Returns
- key or new enum
Decode arc-labels and/or weights as specified in a gfsmArcLabelKey in an automaton fsm
- Parameters
-
fsm | encoded automaton to decode (destructively altered) |
key | stores label-pair enumeration |
decode_labels | whether to decode labels |
decode_weights | whether to decode weights |
- Returns
- decoded fsm