-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
  • 179,855
  • 19
  • 132
  • 245

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
  • 656
  • 5
  • 16