graph-builder
Version:
A graph builder library for modeling abstract graph structures.
21 lines (13 loc) • 550 B
Markdown
[Home](./index) > [graph-builder](./graph-builder.md) > [BaseGraph](./graph-builder.basegraph.md) > [adjacentNodes](./graph-builder.basegraph.adjacentnodes.md)
# BaseGraph.adjacentNodes method
Returns the nodes which have an incident edge in common with `node` in this graph.
Throws an error if `node` is not an element of this graph.
**Signature:**
```javascript
adjacentNodes(node: N): Set<N>;
```
**Returns:** `Set<N>`
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| `node` | `N` | |