Class graph

Directed graph data structure.

Methods

graph:count () Gets the number of nodes and number of edges in graph.
graph:new ([n=0]) Creates a new graph.

Metamethods

graph:__gc () Destroys graph.


Methods

graph:count ()
Gets the number of nodes and number of edges in graph.

Returns:

    |V| and |E|
graph:new ([n=0])
Creates a new graph.

Parameters:

  • n int initial number of nodes (default 0)

Returns:

    the resulting graph

Or

    nil plus error message

Metamethods

graph:__gc ()
Destroys graph.
generated by LDoc 1.4.6 Last updated 2017-08-10 16:45:38