I'm trying to write an algorithm which determines the shortest path between cities. So I have looked at some high level languages of the algorithms, if the is no path between two vertices, they represent this by infinity, is there any way I could represent a very large number in java?
Is the any way one can represent a very large number in java.
Collapse
X
-
What type are you using to represent distance? Consider:
Integer.MAX_VAL UE
or
Double.POSITIVE _INFINITY
Comment