Arithmetic operations on automata. More...
#include <gfsmAutomaton.h>
Go to the source code of this file.
Data Structures | |
struct | gfsmArithParams |
Type representing all parameters for a generic automaton arithmetic operation. More... |
Enumerations | |
enum | gfsmArithOp { gfsmAONone, gfsmAOExp, gfsmAOLog, gfsmAONoNeg, gfsmAOAdd, gfsmAOMult, gfsmAOSRNoNeg, gfsmAOSRPlus, gfsmAOSRTimes } |
Functions | |
Arithmetic (Generic) | |
gfsmAutomaton * | gfsm_automaton_arith (gfsmAutomaton *fsm, gfsmArithOp op, gfsmWeight arg, gfsmLabelVal lo, gfsmLabelVal hi, gboolean do_arcs, gboolean do_final, gboolean do_zero) |
gfsmAutomaton * | gfsm_automaton_arith_state (gfsmAutomaton *fsm, gfsmStateId qid, gfsmArithOp op, gfsmWeight arg, gfsmLabelVal lo, gfsmLabelVal hi, gboolean do_arcs, gboolean do_final, gboolean do_zero) |
gfsmAutomaton * | gfsm_automaton_arith_final (gfsmAutomaton *fsm, gfsmArithOp op, gfsmWeight arg, gboolean do_zero) |
gfsmWeight | gfsm_weight_arith (gfsmSemiring *sr, gfsmArithOp op, gfsmWeight w1, gfsmWeight w2, gboolean do_zero) |
enum gfsmArithOp |
Type representing an elementary arithmetic operation
gfsmAutomaton* gfsm_automaton_arith | ( | gfsmAutomaton * | fsm, |
gfsmArithOp | op, | ||
gfsmWeight | arg, | ||
gfsmLabelVal | lo, | ||
gfsmLabelVal | hi, | ||
gboolean | do_arcs, | ||
gboolean | do_final, | ||
gboolean | do_zero | ||
) |
Perform a generic arithmetic operation on fsm.
fsm | Automaton |
op | Operation arg Argument of operation (if any) |
lo | Perform only for arcs with lower label lo (gfsmNoLabel for any label) |
hi | Perform only for arcs with upper label hi (gfsmNoLabel for any label) |
do_arcs | Perform operation on arc weights |
do_final | Perform operation on final weights |
do_zero | Perform operation on zero weights |
gfsmAutomaton* gfsm_automaton_arith_state | ( | gfsmAutomaton * | fsm, |
gfsmStateId | qid, | ||
gfsmArithOp | op, | ||
gfsmWeight | arg, | ||
gfsmLabelVal | lo, | ||
gfsmLabelVal | hi, | ||
gboolean | do_arcs, | ||
gboolean | do_final, | ||
gboolean | do_zero | ||
) |
Perform a generic arithmetic operation on state qid in fsm.
fsm | Automaton |
qid | State-id in fsm, or gfsmNoState for all states |
op | Operation arg Argument of operation (if any) |
lo | Perform only for arcs with lower label lo (gfsmNoLabel for any label) |
hi | Perform only for arcs with upper label hi (gfsmNoLabel for any label) |
do_arcs | Perform operation on arc weights |
do_final | Perform operation on final weights |
do_zero | Perform operation on zero weights |
gfsmAutomaton* gfsm_automaton_arith_final | ( | gfsmAutomaton * | fsm, |
gfsmArithOp | op, | ||
gfsmWeight | arg, | ||
gboolean | do_zero | ||
) |
Perform a generic arithmetic operation on final weights
gfsmWeight gfsm_weight_arith | ( | gfsmSemiring * | sr, |
gfsmArithOp | op, | ||
gfsmWeight | w1, | ||
gfsmWeight | w2, | ||
gboolean | do_zero | ||
) |
Perform a generic arithmetic operation on a gfsmWeight.