Module: latex

Methods

(static) serialize(graph) → {String}

Parameters:
Name Type Description
graph Object graph to be converted to latex
Source:
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
Source:
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
Source:
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
Source:
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
Source:
Returns:
tikz labels for the type of state
Type
String