Boost logo

Boost Users :

Subject: Re: [Boost-users] Integer vs. Double values for link weights in Graph
From: Jens Buysse (jens.buysse_at_[hidden])
Date: 2011-07-20 03:26:28


Hello Jeremiah !

Indeed, I defined it using int and hence double were converted! Thanks a
lot for the help!

Kind regards

Jen Buysse

Op 20/07/2011 2:52, Jeremiah Willcock schreef:
> On Tue, 19 Jul 2011, Jens Buysse wrote:
>
>> Dear all,
>>
>> I'm new to the BOOST library (and actually also to c++).
>>
>> I have the following problem: I want to use the dijkstra algorithm
>> for computing shortest paths in a network. For this I calculate
>> weights, which in my case take the form of double < 1. But it seems
>> internally boost converts to an integer. Is there a way to use double
>> without miltilplying it with e.g. 100 to get Integers?
>
> The code uses whichever data type your graph and property maps use to
> store the edge lengths. Does your distance map have a value type of
> double? That is what is used to determine the type used internally
> for lengths and distances.
>
> -- Jeremiah Willcock
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users

-- 
Jens Buysse
Research Group Broadband Communication Networks (IBCN)
Department of Information Technology (INTEC), Ghent University/ IBBT
Gaston Crommenlaan 8 bus 201, B-9050 Gent, Belgium
tel		: +32 9 33 14 942
fax		: +32 9 33 14 899
mobile	: +32 479 32 21 72
e-mail	: jens.buysse_at_[hidden]
skype	: jens.buysse
web		: http://ibcn.intec.ugent.be/
web		: www.myspace.com/aratf

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net