Class: Vertex

Graph. Vertex

new Vertex(name, value)

Constructor for a vertex of Graph
Parameters:
Name Type Description
name string Name of the vertex
value number Value of the vertex
Properties:
Name Type Description
name string The name given to the vertex
edges array Edges of the vertex
value number The value of the value argument
Source:

Members

edges

Create an empty array for edges
Source:

name

Store the name argument as a property
Source:

value

Store the value argument as a property
Source:

Methods

degree() → {number}

Prototype function which returns the number of edges of a Graph.Vertex
Source:
Returns:
The length of the edges
Type
number