Infinity in c++ you can use this -> std::cout << std::numeric_limits<double>::infinity ()<<endl; But for dijkstra you can represent infinity by a long value like INT_MAX or LONG_MAX, not necesarily infinity.
2011/2/18 Akash Mukherjee <[email protected]> > hi, > > i have a slightly different but related probelm, i am trying to implement > djiktra's in c++ & how should i deal with the infinity weights( i mean does > c++ have infinity)? > > thanx in advance :) > > > On Fri, Feb 18, 2011 at 10:16 PM, Balaji S <[email protected]>wrote: > >> just output..unicode of infinity.. :) >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
