First stab at indexed automata.
More...
#include <gfsmArcIndex.h>
#include <gfsmIndexed.hi>
Go to the source code of this file.
Functions |
|
static gfsmIndexedAutomaton * | gfsm_indexed_automaton_new_full (gfsmAutomatonFlags flags, gfsmSRType srtype, gfsmStateId n_states, guint n_arcs) |
static gfsmIndexedAutomaton * | gfsm_indexed_automaton_new (void) |
gfsmIndexedAutomaton * | gfsm_indexed_automaton_copy (gfsmIndexedAutomaton *dst, gfsmIndexedAutomaton *src) |
static gfsmIndexedAutomaton * | gfsm_indexed_automaton_clone (gfsmIndexedAutomaton *xfsm) |
static void | gfsm_indexed_automaton_clear (gfsmIndexedAutomaton *xfsm) |
static void | gfsm_indexed_automaton_free (gfsmIndexedAutomaton *xfsm) |
|
gfsmIndexedAutomaton * | gfsm_automaton_to_indexed (gfsmAutomaton *fsm, gfsmIndexedAutomaton *xfsm) |
gfsmAutomaton * | gfsm_indexed_to_automaton (gfsmIndexedAutomaton *xfsm, gfsmAutomaton *fsm) |
|
static void | gfsm_indexed_automaton_reserve_states (gfsmIndexedAutomaton *xfsm, gfsmStateId n_states) |
static void | gfsm_indexed_automaton_reserve_arcs (gfsmIndexedAutomaton *xfsm, guint n_arcs) |
static void | gfsm_indexed_automaton_sort (gfsmIndexedAutomaton *xfsm, gfsmArcCompMask sort_mask) |
|
static void | gfsm_arcrange_open_indexed (gfsmArcRange *range, gfsmIndexedAutomaton *xfsm, gfsmStateId qid) |
gfsmAutomaton API: States |
#define | gfsm_indexed_automaton_set_final_state(xfsm, qid, is_final) gfsm_indexed_automaton_set_final_state_full((xfsm),(qid),(is_final),(xfsm)->sr->one) |
static gboolean | gfsm_indexed_automaton_has_state (gfsmIndexedAutomaton *xfsm, gfsmStateId qid) |
static gfsmStateId | gfsm_indexed_automaton_ensure_state (gfsmIndexedAutomaton *xfsm, gfsmStateId qid) |
static void | gfsm_indexed_automaton_remove_state (gfsmIndexedAutomaton *fsm, gfsmStateId qid) |
static void | gfsm_indexed_automaton_set_final_state_full (gfsmIndexedAutomaton *fsm, gfsmStateId qid, gboolean is_final, gfsmWeight final_weight) |
static gboolean | gfsm_indexed_automaton_lookup_final (gfsmIndexedAutomaton *fsm, gfsmStateId id, gfsmWeight *wp) |
static gboolean | gfsm_indexed_automaton_state_is_final (gfsmIndexedAutomaton *xfsm, gfsmStateId qid) |
static gfsmWeight | gfsm_indexed_automaton_get_final_weight (gfsmIndexedAutomaton *xfsm, gfsmStateId qid) |
static guint | gfsm_indexed_automaton_out_degree (gfsmIndexedAutomaton *fsm, gfsmStateId qid) |
Detailed Description
Macro Definition Documentation
#define gfsm_indexed_automaton_get_semiring |
( |
|
xfsm | ) |
(xfsm->sr) |
Get pointer to the semiring associated with this automaton
Set boolean final-state flag.
- Returns
- (void)
Function Documentation
Create a new indexed automaton, using some default values
Reserve space for at least n_states states
Reserve space for at least n_arcs arcs
Set the semiring associated with this automaton
Set the semiring associated with this automaton by semiring-type
Get number of states (constant time)
Get total number of arcs (constant time)
Get Id of root node, or gfsmNoState if undefined
Set Id of root node, creating state if necessary
Check whether automaton has a state with ID qid.
Ensures that state id exists
- Returns
- qid
Set final weight.
- Returns
- (void)
Lookup final weight.
- Returns
- TRUE iff state id is final, and sets *wp to its final weight.
Get number of outgoing arcs.
- Returns
- guint
Open a gfsmArcRange for outgoing arcs from state qid in xfsm