[gecode-users] Some more documentation comments

Kish Shen kisshen at cisco.com
Mon Sep 26 18:09:05 CEST 2011


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.



More information about the users mailing list