Nodes are 1 of the 2 fundamental components in a graph
Get an array of edges that contain this node
Examples
var adjacent = node.adjacentEdges()
Returns Array<GraphEdge> array of adjacent edges
Get an array of nodes that share an edge in common with this node
Examples
var adjacent = node.adjacentNodes()
Returns Array<GraphNode> array of adjacent nodes
Test if a node is connected to another node by an edge
Parameters
node
GraphNode test adjacency between this and the supplied parameterExamples
var isAdjacent = node.isAdjacentToNode(anotherNode);
Returns boolean true or false, adjacent or not
The degree of a node is the number of adjacent edges, circular edges are counted twice
Examples
var degree = node.degree();
Returns number number of adjacent edges