Total Neighbors (Beta)
The algorithm calculates the total number of neighbors of two vertices.
Specifications
Parameters
Name | Description | Data type |
| A vertex. |
|
| A vertex. |
|
| Edge types to traverse. |
|
Return value
The total number of neighbors of two vertices.
Example
Suppose we have the following graph.
Dan and Jenny together have 6 neighbors in total. Running the algorithm between Dan and Jenny would give us a result of 6. Note that since Jenny and Dan are neighbors themselves, the union of their neighbors includes both Jenny and Dan:
Last updated