Methods
(static) serialize(graph) → {String}
Parameters:
Name | Type | Description |
---|---|---|
graph |
Object | graph to be converted to latex |
Returns:
representation of graph in latex tikzpicture
- Type
- String
(inner) compress_planar(type, states) → {Array.<String>}
compresses graph to tikz space
Parameters:
Name | Type | Description |
---|---|---|
type |
String | type of graph (DFA, NFA, ...) |
states |
Array.<Object> | the states of the graph |
Returns:
formatted positions of states
- Type
- Array.<String>
(inner) edge_to_string(type, edge, labelPos) → {String}
converts an edge to tikz string representation
Parameters:
Name | Type | Description |
---|---|---|
type |
String | type of graph (DFA, NFA, ...) |
edge |
Object | edge to convert to string |
labelPos |
String | where to position label on edge |
Returns:
- tikz string representaiton of edge
- Type
- String
(inner) get_label_pos(edge) → {String}
gives the position to place label at
Parameters:
Name | Type | Description |
---|---|---|
edge |
Object |
Returns:
position of label around edge
- Type
- String
(inner) get_state_type(state) → {String}
Computes the type of a given state
Parameters:
Name | Type | Description |
---|---|---|
state |
Object |
Returns:
tikz labels for the type of state
- Type
- String