Module: permalink

Methods

(static) deserialize(graph_str) → {Array.<(string|Object)>}

basically the 'fromString' method for the graph
Parameters:
Name Type Description
graph_str string the string representation of the graph
Source:
Returns:
type of the graph in {'NFA', 'PDA', 'Turing'} and the graph
Type
Array.<(string|Object)>

(static) serialize(type, graph) → {string}

basically the 'toString' method for the graph
Parameters:
Name Type Description
type string the type of the graph in {'NFA', 'PDA', 'Turing'}
graph Object check 'graph_components.js' for the structure of the graph
Source:
Returns:
the graph as a string
Type
string

(inner) char_url_compliance(c) → {string}

makes a character url compliant and makes sure it does not clash with the delimiters
Parameters:
Name Type Description
c string the character to be made url compliant
Source:
Returns:
the url compliant character
Type
string

(inner) parse_type(graph_str) → {Array.<string>}

find the type of the graph and return it along with the rest of the unparsed graph string
Parameters:
Name Type Description
graph_str string the string representation of the graph
Source:
Returns:
type of the graph in {'NFA', 'PDA', 'Turing'} and the rest of the unparsed graph string
Type
Array.<string>

(inner) to_string_field(field) → {string}

turn a field into a string
Parameters:
Name Type Description
field string | float
Source:
Returns:
the string repr of the field
Type
string