I'm trying to figure out the best way to represent a network of nodes in an undirected graph.
Each node can have n peers.
I'd like to be able to derive the following:
1) Count all nodes in a given network
2) Retrieve all nodes closer than X steps away from a given node
3) Retrieve all nodes further than X steps away from a given node
What's the best way to represent this?
Each node can have n peers.
I'd like to be able to derive the following:
1) Count all nodes in a given network
2) Retrieve all nodes closer than X steps away from a given node
3) Retrieve all nodes further than X steps away from a given node
What's the best way to represent this?