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 |
- Source:
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 |
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