[gecode-users] Extending Integer Variable

Christian Schulte cschulte at kth.se
Mon Apr 7 21:56:12 CEST 2008


Yes, you are right. Also IntVars with unlimited precision using gmp... All
doable, the only thing is that we sort out which occurrence of "int" refers
to variables and which refer to other occurrences.

The problem with 64 bit integers, though is that we have to have a datatype
that is bigger than the data type of variables. Now we use double for that
purpose. With 64 bit integers we might resort to 128 bit integers...

If you implement FloatVars, please keep us posted. If you want to contribute
to Gecode we would be more than happy to help!

All the best
Christian

--
Christian Schulte, www.ict.kth.se/~cschulte/


-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Filip Konvicka
Sent: Monday, April 07, 2008 8:22 AM
To: users at gecode.org
Subject: Re: [gecode-users] Extending Integer Variable

> let me first elaborate a little bit how Gecode's variables and propagators
> are structured before I actually attempt to give an answer.
...
> What do you want to do? Do you think it me be generally useful to be
> included in Gecode anyway?

Hi,

I am currently thinking of implementing floating-point-based variables 
(maybe based on Boost.Interval), so thanks for the summary :-)

Anyway, before I decided that I need floating-point numbers, I was 
thinking why you can't have "long long"-based variables when you already 
have IntVars. On 64bit platforms, long long might be an interesting 
choice IMO. But I realize that if that should be a part of Gecode, it 
would probably mean adding template parameters to many classes/functions 
and maybe it would make things less understandable. But then, if it's 
only restricted to integral types, who knows.... the point is that 
there's a lot of work done for the IntVars, so it'd be great to reuse it.

Regards,
Filip


_______________________________________________
Gecode users mailing list
users at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users





More information about the gecode-users mailing list