Graph.Edge Class
Constructor for edge of a Graph
Constructor
Graph.Edge
(
-
tail
-
head
Parameters:
-
tail
Graph.VertexThe tail vertex
-
head
Graph.VertexThe head vertex
Methods
addEdge
()
Graph.Edge
Method for adding new Graph.Edge
Returns:
Graph.Edge:
An instance of a Graph.Edge
addVertex
(
Graph.Vertex
-
name
-
value
Add a new Graph.Vertex or updates the value of an existing one
Returns:
Graph.Vertex:
New or updated Graph.Vertex
Example:
var newVertex = Graph.addVertex("vertex1", 20);