Goto Chapter: | Top | 1 | 2 | 3 | 4 | 5 | 6 | A | B | Bib | C | Ind

### B. Drawing automata

The drawing of graphs described here uses `graphviz` [DE+02], a software for drawing graphs developed at AT & T Labs, that can be obtained at `http://www.graphviz.org/`.

#### B.1 Installing some external programs

If you work under `LINUX`, you should install `graphviz`.

#### B.2 Functions to draw automata

##### B.2-1 DrawAutomaton

`> DrawAutomaton`( A[, file] ) | ( function )

This function draws automaton `A`.

    gap> x:=Automaton("det",3,2,[ [ 2, 3, 0 ], [ 0, 1, 2 ] ],[ 1 ],[ 1, 2, 3 ]);;
    gap> DrawAutomaton(x,"exx");
    Displaying file: /tmp/tmp.LKoc7O/exx.dot.ps

The output would be the following diagram displayed in a ghostview window.

##### B.2-2 DrawAutomata

`> DrawAutomata`( A, B[, file] ) | ( function )

This function tests if automaton `A` is a subautomaton of `B` in which case draws `B` highlighting the edges not in `A` by drawing them in a dotted style, while the others are drawn in a plain style.

##### B.2-3 DrawGraph

`> DrawGraph`( G[, file] ) | ( function )

Draws a graph specified as an adjacency list `G`.

##### B.2-4 DrawSCCAutomaton

`> DrawSCCAutomaton`( A[, file] ) | ( function )

Draws automaton `A` and highlights it's strongly connected components by drawing the other edges in a dotted style.

Top of Book | Previous Chapter | Next Chapter

Goto Chapter: | Top | 1 | 2 | 3 | 4 | 5 | 6 | A | B | Bib | C | Ind

generated by GAPDoc2HTML