neighbor list

Table of Contents

1 (deg 2): 2-[1], 3-[1]
2 (deg 1): 1-[1]
3 (deg 1): 1-[1]

A list of all the nodes in the graph with their neighbors, with syntax node i (deg degree)- list of neighbors of node i-[weight of connection to the neighbor]

It is quick to retrieve neighbor of a node from this representation, so it could be seen as a representation prioritizing the get_neighbors(node) function

Backlinks

Author: Linfeng He

Created: 2024-04-03 Wed 23:17