[gecode-users] about gcc

Stefano Gualandi stefano.gualandi at fastwebnet.it
Fri Nov 25 16:30:03 CET 2005


Hi Mikeal and Patrick,

thanks for the answer.

>> (a fresh 'svn up' does not compile)
>
> I just did a fresh update and it compiled for me. What kind of system
> are you using, and which compilation errors do you get?

I use mac os X Tiger 10.4.3, with 'gcc -v':

    Thread model: posix
    gcc version 4.0.0 20041026 (Apple Computer, Inc. build 4061)


With the last update I am able to compile. Thanks.

Now, I got the following question. Let us have a vector of three  
variables xs, with domain [0...3] (i.e. |xs|+1). Each value in the  
sub-domain [0..2] can be taken once by element of xs, while value 3  
can be taken as many time as possible. This should be done with  
constraint (using pseudo gecode syntax):

gcc(space*, xs, c, ICL_DEF)

where c is something like [[0..1] [0..1] [0..1] [0..3]].

Example of solutions are tuple:
xs = [0 1 2]   -> c = [1 1 1 0]
xs = [1 3 3]   -> c = [0 1 0 2]
xs = [3 3 3]   -> c = [0 0 0 3]
...and so on.


Am I using correctly your implementation of 'gcc'?

cheers,
Stefano

P.S. (example in the script attached)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-test.cpp
Type: application/octet-stream
Size: 1148 bytes
Desc: not available
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20051125/f8475bc3/attachment.obj>
-------------- next part --------------









More information about the gecode-users mailing list