From ea611a8fd04ac9bac9e87ab1017a8666d1e80973 Mon Sep 17 00:00:00 2001 From: Bryan Jurish Date: Wed, 31 Jan 2007 11:27:20 +0000 Subject: updated help patches for gfsm_state changes svn path=/trunk/externals/moocow/; revision=7399 --- gfsm/src/gfsm_automaton-help.pd | 30 +++++++-------- gfsm/src/gfsm_markov.pd | 85 ++++++++++++++++++++--------------------- gfsm/src/gfsm_state-help.pd | 45 ++++++++++++---------- 3 files changed, 82 insertions(+), 78 deletions(-) (limited to 'gfsm') diff --git a/gfsm/src/gfsm_automaton-help.pd b/gfsm/src/gfsm_automaton-help.pd index 52a2bc8..a26c7fa 100644 --- a/gfsm/src/gfsm_automaton-help.pd +++ b/gfsm/src/gfsm_automaton-help.pd @@ -1,4 +1,4 @@ -#N canvas 126 0 479 520 10; +#N canvas 8 34 479 520 10; #X text 89 7 gfsm_automaton : weighted finite state machine; #X text 183 489 Bryan Jurish ; #X text 7 436 SEE ALSO:; @@ -12,11 +12,6 @@ #X text 7 211 SUBTOPICS:; #X text 10 114 DESCRIPTION:; #X text 245 211 GUTS:; -#X text 28 130 gfsm_automaton objects represent weighted finite state -machines (acceptors or transducers) -- rooted \, acyclic graphs whose -edges are labelled with triples (LO \, HI \, WEIGHT) \, where LO and -HI are alphabet labels (see gfsm_alphabet) \, and WEIGHT is a floating -point number.; #X obj 265 272 print fsm-help-out; #X obj 135 457 gfsm_alphabet; #N canvas 192 14 651 458 help-automaton-flags 0; @@ -153,11 +148,11 @@ transducer" format \, regardless of automaton flags or input file content. #X msg 24 140 concat fsm-help; #X text 215 141 "concat FSM2" : concatenate with automaton named FSM2 ; -#X text 187 197 "difference FSM2" : remove language of automaton named +#X text 187 203 "difference FSM2" : remove language of automaton named FSM2; -#X text 194 228 "intersect FSM2" : intersect with automaton named FSM2 +#X text 194 235 "intersect FSM2" : intersect with automaton named FSM2 ; -#X text 250 266 "invert" : swap upper and lower labels; +#X text 250 268 "invert" : swap upper and lower labels; #X msg 24 302 project 0; #X msg 24 319 project 1; #X text 208 298 "project SIDE" : project one label side; @@ -165,10 +160,10 @@ FSM2; #X text 328 323 SIDE=1: project upper labels; #X text 208 348 "product FSM2" : compute Cartesian product with FSM2 ; -#X text 243 407 "reverse" : reverse language of an automaton; +#X text 243 414 "reverse" : reverse language of an automaton; #X text 95 6 gfsm_automaton : algebraic operations; -#X text 229 439 "rmepsilon" : remove epsilon arcs; -#X text 222 478 "union FSM2" : compute union with automaton FSM2; +#X text 229 444 "rmepsilon" : remove epsilon arcs; +#X text 222 480 "union FSM2" : compute union with automaton FSM2; #X obj 24 505 s fsm-help-in; #X text 31 551 WARNING: these methods may block for long periods of time for large automata.; @@ -178,7 +173,7 @@ time for large automata.; #X text 229 70 "closure N" : compute N-ary closure; #X text 215 170 "determinize" : determinize an acceptor; #X msg 24 383 connect; -#X text 244 382 "connect" : remove useless states and arcs; +#X text 244 385 "connect" : remove useless states and arcs; #X connect 0 0 27 0; #X connect 1 0 27 0; #X connect 2 0 27 0; @@ -336,5 +331,10 @@ package from at&t.; #X connect 10 0 2 0; #X connect 15 0 2 0; #X restore 22 386 pd help-automaton-lookup; -#X connect 21 0 28 0; -#X connect 28 0 14 0; +#X text 28 130 gfsm_automaton objects represent weighted finite state +machines (acceptors or transducers) -- rooted and possibly cyclic graphs +whose edges are labelled with triples (LO \, HI \, WEIGHT) \, where +LO and HI are alphabet labels (see gfsm_alphabet) \, and WEIGHT is +a floating point number.; +#X connect 20 0 27 0; +#X connect 27 0 13 0; diff --git a/gfsm/src/gfsm_markov.pd b/gfsm/src/gfsm_markov.pd index fa2ea8b..705e56f 100644 --- a/gfsm/src/gfsm_markov.pd +++ b/gfsm/src/gfsm_markov.pd @@ -284,63 +284,62 @@ clear fsm alph state add2; #X connect 35 0 34 1; #X connect 36 0 34 1; #X restore 21 186 pd gfsm_markov_add_guts; -#N canvas 29 370 662 532 gfsm_markov_next_guts 0; +#N canvas 48 114 662 532 gfsm_markov_next_guts 0; #X obj 28 4 r \$0-next; #X obj 243 464 outlet; #X obj 28 26 route bang; -#X obj 167 138 * 1; -#X obj 28 70 random 131072; -#X obj 28 91 / 131072; +#X obj 217 168 * 1; #X obj 405 461 outlet; #X obj 101 429 gfsm_alphabet \$1-alph; #X msg 101 407 char2atom! \$1; -#X obj 86 225 unpack 0 0 0 0; +#X obj 70 377 unpack 0 0 0 0; #X msg 18 411 set \$1; #X obj 18 432 s \$0-state; -#X obj 512 461 outlet; +#X obj 502 461 outlet; #X obj 263 428 gfsm_alphabet \$1-alph; #X msg 263 406 char2atom! \$1; -#X obj 424 101 gfsm_state \$1-fsm 0; -#X obj 424 20 r \$0-state; -#X obj 512 150 route bang; -#X obj 512 172 t b; -#X obj 424 124 route total_weight arc_gen; +#X obj 414 234 gfsm_state \$1-fsm 0; +#X obj 414 20 r \$0-state; +#X obj 502 283 route bang; +#X obj 502 305 t b; +#X obj 414 257 route total_weight arc_gen; #X obj 28 48 t b; -#X obj 153 71 t b f; -#X obj 167 115 f 0; -#X obj 196 114 t b f; -#X msg 167 160 arc_gen \$1; -#X msg 153 91 arc_reset \, total_weight; -#X obj 153 187 s \$0-state; +#X obj 203 124 t b f; +#X obj 217 145 f 0; +#X obj 246 144 t b f; +#X msg 217 190 arc_gen \$1; +#X msg 47 190 arc_reset \, total_weight; +#X obj 28 70 random 524287; +#X obj 28 91 / 524287; #X connect 0 0 2 0; -#X connect 2 0 20 0; -#X connect 2 1 21 0; -#X connect 3 0 24 0; -#X connect 4 0 5 0; -#X connect 5 0 21 0; -#X connect 7 1 1 0; -#X connect 8 0 7 0; -#X connect 9 0 10 0; -#X connect 9 1 8 0; -#X connect 9 2 14 0; -#X connect 10 0 11 0; -#X connect 13 1 6 0; +#X connect 2 0 18 0; +#X connect 2 1 19 0; +#X connect 3 0 22 0; +#X connect 5 1 1 0; +#X connect 6 0 5 0; +#X connect 7 0 8 0; +#X connect 7 1 6 0; +#X connect 7 2 12 0; +#X connect 8 0 9 0; +#X connect 11 1 4 0; +#X connect 12 0 11 0; +#X connect 13 0 17 0; #X connect 14 0 13 0; -#X connect 15 0 19 0; -#X connect 16 0 15 0; -#X connect 17 0 18 0; -#X connect 17 1 9 0; -#X connect 18 0 12 0; +#X connect 15 0 16 0; +#X connect 15 1 7 0; +#X connect 16 0 10 0; +#X connect 17 0 21 0; +#X connect 17 1 15 0; +#X connect 18 0 24 0; #X connect 19 0 23 0; -#X connect 19 1 17 0; -#X connect 20 0 4 0; -#X connect 21 0 25 0; -#X connect 21 1 22 1; -#X connect 22 0 3 0; -#X connect 23 0 22 0; -#X connect 23 1 3 1; -#X connect 24 0 26 0; -#X connect 25 0 26 0; +#X connect 19 1 20 1; +#X connect 20 0 3 0; +#X connect 21 0 20 0; +#X connect 21 1 3 1; +#X connect 22 0 13 0; +#X connect 23 0 13 0; +#X connect 24 0 25 0; +#X connect 25 0 19 0; #X restore 22 216 pd gfsm_markov_next_guts; #X obj 185 260 outlet; #X connect 3 0 6 0; diff --git a/gfsm/src/gfsm_state-help.pd b/gfsm/src/gfsm_state-help.pd index 96d07b4..775780f 100644 --- a/gfsm/src/gfsm_state-help.pd +++ b/gfsm/src/gfsm_state-help.pd @@ -1,4 +1,4 @@ -#N canvas 154 10 651 599 10; +#N canvas 426 16 651 599 10; #X obj 85 569 gfsm; #X text 15 569 SEE ALSO:; #X text 41 6 gfsm_state : position "pointer" for finite-state automata @@ -22,35 +22,39 @@ #X text 163 146 "automaton NAME" : use a shared machine named NAME ; #X msg 58 212 degree; -#X text 137 213 "degree" : get number of outgoing arcs (linear time) +#X text 245 213 "degree" : get number of outgoing arcs (linear time) ; -#X msg 61 325 arc_first; -#X msg 61 342 arc_next; -#X msg 65 412 arc_reset; +#X msg 57 347 arc_first; +#X msg 57 364 arc_next; +#X msg 61 434 arc_reset; #X obj 26 508 gfsm_state fsm-help 0; -#X text 75 258 arcs are output as a list:; -#X text 265 258 NEXT_STATEID LO HI WEIGHT; -#X text 306 392 (negative labels are ignored); -#X msg 64 376 arc_seek 202 -1; -#X text 208 326 "arc_first" : get first outgoing arc; -#X text 215 342 "arc_next" : get next available outgoing arc (maybe +#X text 71 280 arcs are output as a list:; +#X text 261 280 NEXT_STATEID LO HI WEIGHT; +#X text 302 414 (negative labels are ignored); +#X msg 60 398 arc_seek 202 -1; +#X text 204 348 "arc_first" : get first outgoing arc; +#X text 211 364 "arc_next" : get next available outgoing arc (maybe first); -#X text 173 377 "arc_seek LO HI" : get next arc with labels LO:HI; -#X text 213 413 "arc_reset" : close internal arc iterator; +#X text 169 399 "arc_seek LO HI" : get next arc with labels LO:HI; +#X text 209 435 "arc_reset" : close internal arc iterator; #X msg 54 467 add_weight 1 -1 101 0.9; #X text 233 470 "add_weight ID LO HI W" : add W to 1st arc to state ID; #X text 416 483 with labels LO:HI; #X text 271 499 (implicitly resets arc iterator); #X msg 61 229 cyclic; -#X text 137 229 "cyclic" : does this state lead to any cycles?; -#X msg 64 359 arc_nth 0; -#X text 208 360 "arc_nth N" : seek to n-th arc (counting from zero) +#X text 245 229 "cyclic" : does this state lead to any cycles?; +#X msg 60 381 arc_nth 0; +#X text 204 382 "arc_nth N" : seek to n-th arc (counting from zero) ; -#X msg 61 278 arc_gen 42 1; -#X text 186 281 "arc_gen W SR" : generate an arc; -#X text 312 295 W - weight hint (0..sum(weights(state)); -#X text 304 309 SR - boolean - whether to use gfsmSemiring; +#X msg 57 300 arc_gen 42 1; +#X text 182 303 "arc_gen W SR" : generate an arc; +#X text 308 317 W - weight hint (0..sum(weights(state)); +#X text 300 331 SR - boolean - whether to use gfsmSemiring; +#X text 181 247 "total_weight SR" : get total weight of outgoing arcs +; +#X text 323 261 SR - boolean: use gfsmSemiring?; +#X msg 65 246 total_weight 1; #X connect 12 0 25 0; #X connect 15 0 25 0; #X connect 16 0 25 0; @@ -65,3 +69,4 @@ ID; #X connect 38 0 25 0; #X connect 40 0 25 0; #X connect 42 0 25 0; +#X connect 48 0 25 0; -- cgit v1.2.1