-1

I want to implement the dijkstra algorithm and have to set each note at the beginning to infinity.

I would like to know, if there is any function in Java which makes it easy.

OneCricketeer
  • 151,199
  • 17
  • 111
  • 216

1 Answers1

1

Double.POSITIVE_INFINITY if you are using Double to store your data. Also note that this is not a number, which is nice depending on what you want to do. Double supports this concept.

Demogorii
  • 646
  • 5
  • 16