Ranter
Join devRant
Do all the things like
				++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
				Sign Up
			Pipeless API
 
				From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
				Learn More
			Comments
		- 
				
				Are there nodes that have access to other modes that some don’t? Is there some kind of metric to decide whether or not a path is more efficient than the other (latency)?
- 
				
				Not 100% sure what you mean by node, not really my area of development. But maybe you could somehow adapt the A* pathfinding algorithm ?
- 
				
				 donuts232478y@host127001 I thought it was Breadth First Search for finding Shortest path? I could be wrong.... donuts232478y@host127001 I thought it was Breadth First Search for finding Shortest path? I could be wrong....
- 
				
				 Wack61258yAssign a weight of 1 to each edge. And then use BFS. If edges have different weights, like node A to B takes longer than node A to C plus C to B, then you'd need dijkstra. Wack61258yAssign a weight of 1 to each edge. And then use BFS. If edges have different weights, like node A to B takes longer than node A to C plus C to B, then you'd need dijkstra.
 Look them up on Youtube and there should be plemty of examples on github. This is all assuming there are no negative weighted edges.
- 
				
				Sinatra would solve this, but A* (a-star) is a bit more efficient. It's also possible to improve it with parallel computing
- 
				
				@cachoputa OH FUCK I meant "Dijkstra" and not "Sinatra" wtf
 
 And @Wack, it needs to know where the start and end nodes are in space (the coordinates) so it can know the distance
Related Rants









 Hahahahahaha. Ded.
Hahahahahaha. Ded.
okay, so i have a program with an arbitrary number of nodes. each nodes is connected to an arbitrary number of nodes. how can i find the shortest path between two nodes efficiently?
also, im thinking of gpgpu to speed this up, what do you guys think?
question
arbitrary
nodes