Let's say I have an array of points, each of them defined by their distance to surrounding points, rather than by coordinates on a map. For instance, NY's location would be defined by its distance to Pennsylvania and Maryland, etc. And Washington is defined by its distance to Oregon and Idaho, etc.
Assuming each point is defined by a limited number of connections, how would I find the distance between two points that don't share connections, such as NY and WA?
The scenario is a map of node points in 3D space, and rather than defining their coordinates in terms of XYZ on a graph, I'm defining their distances between each other in terms of XYZ. So if Point A is in some location in space with a number of surrounding neighbors, and Point Z is in some other location in space with a number of other surrounding neighbors, I want to be able to find the distance between A and Z.
I've already considered a flood method, similar to how simpler pathfinding works, flooding a temporary connection map and finding the shortest path drawn and using that path to figure out a straight line distance. This method seems very costly, however.