[Gecode] Another abstraction sets...

Christian Schulte schulte at imit.kth.se
Fri Jul 16 17:05:53 CEST 2004


I have to admit that I do not subscribe to this reasoning: if there is
anything that will be extended first by user of Gecode it will be a new
branching. So providing some functionality for programming distributors
easily might be a good idea.

But in the end it is of course a matter of taste.

What is not a matter of taste is unrollinh the code for computing unknown
over and over again with branching. Put it into an abstraction.

The style for implementing branchings needs revision, I just took the
stuffer over from Mozart. To ease adding new stuff I think that using
templates is a good idea. I will do it for ints anytime soon.

Cheers
Christian

--
Christian Schulte, http://www.imit.kth.se/~schulte/ 

-----Original Message-----
From: Gabor Szokoli [mailto:szokoli at ps.uni-sb.de] 
Sent: Friday, July 16, 2004 4:09 PM
To: schulte at imit.kth.se; Technical discussions about Gecode
Subject: Re: [Gecode] Another abstraction sets...


Christian Schulte wrote:

>...how about having card() (or size() as it is called for integers). A 
>look to branch.cc makes it obvious.
>  
>
Hello!

We used to have methods for accessing the "unknown" set as an iterator, 
upper minus lower bound, but we only needed it in the distributors, so 
it became a victim of interface unbloating.

Getting its size was of course uboptimal, as it equals ubSize()-lbSize(). I
fixed only this now.

Gabor Szokoli




More information about the gecode-users mailing list