[gecode-users] Some more documentation comments

Christian Schulte cschulte at kth.se
Mon Sep 26 20:25:55 CEST 2011


Hi,

Good point about counts, the GCCAT has overlapping entries (here the
difference between counts and among is essentially that for one a set is
represented as a list and otherwise as a set...) where it is not entirely
clear to me which is which and why they actually deserve different names ;-)

I am not so sure about name mangling in the documentation, I rather like the
names short. Also, not all type variants are in fact given as a code
snippet. If I need to see the argument types I go to the reference doc which
has the full type info.

Cheers
Christian

--
Christian Schulte, KTH, web.it.kth.se/~cschulte/


-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Kish Shen
Sent: Monday, September 26, 2011 6:09 PM
To: users at gecode.org
Subject: [gecode-users] Some more documentation comments

Hi,

In the MPG description for the count constraints, counts is listed as one of
the GCCAT equivalent for the first variant described (along with count,
exactly, atleast, atmost). However, as far as I can tell, counts accepts a
collection of values, rather than a single value (as in count, exactly
etc.), so it should be listed with the second variant of count described --
i.e. the one where y is an integer set. Is this correct?

A secondary point is the the listing of the constraint is the same in both
variants, even though some of the arguments are of different type:

count(home, x, y, IRT_EQ, z)

This seems to be quite common in the MPG, and I often have difficulty
figuring out what the arguments are -- I need to look quite carefully at the
text.

Do you think it is a good idea to use an informal convention to distinguish
different types of arguments? The simplest one I can think of is to add an
's' if the argument is not a simple element that has a single value, i.e. if
it is an array or a set, so  for the first count variant, something like

count(home, xs, y, IRT_EQ, z)

and the second variant

count(home, xs, ys, IRT_EQ, z)

This can also be extended further so that names starting with certain
letters are of certain types, e.g. x, y, z for IntVar, and c for int (c for
constant), or something like i,j,k if there are more than one integer
argument (and I guess some other letters for sets).

Cheers,

Kish

--
This e-mail may contain confidential and privileged material for the sole
use of the intended recipient. Any review, use, distribution or disclosure
by others is strictly prohibited. If you are not the intended recipient (or
authorized to receive for the recipient), please contact the sender by reply
e-mail and delete all copies of this message.
Cisco Systems Limited (Company Number: 02558939), is registered in England
and Wales with its registered office at 1 Callaghan Square, Cardiff, South
Glamorgan CF10 5BT.

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




More information about the users mailing list