dcsex.containers.graph
Basic Graph container
Contents
Functions
Edge:__init(cost)
Parameters
- cost
Edge:cost()
Needed in weighted graph searches.
Returns
- number
Node:found(node)
Parameters
- node
Returns
- boolean
Graph:exists(x)
Parameters
- x
Returns
- boolean
Graph:neighbors(x)
Parameters
- x
Returns
- list
Graph:adjacent(x, y)
Parameters
- x
- y
Returns
- boolean
Graph:add_node(x)
Parameters
- x
Graph:remove_node(x)
Parameters
- x
Graph:add_edge(x, y, edge)
will overwrite any edge previously associated with a x-y pair
Parameters
- x
- y
- edge
Graph:remove_edge(x, y)
Parameters
- x
- y