conjure-cp / conjure

Conjure: The Automated Constraint Modelling Tool
Other
96 stars 20 forks source link

the fate of hist #314

Open ozgurakgun opened 9 years ago

ozgurakgun commented 9 years ago

Originally reported by: Özgür Akgün (Bitbucket: ozgurakgun, GitHub: ozgurakgun)


I want it gone. It doesn't seem to add anything over freq, nobody ever used it, is a bit of a headache to implement.


ozgurakgun commented 7 years ago

There are 3 versions of hist that make sense to me.

  1. Has only one argument: the collection of values. Produces a histogram of values in the form of a list-of-pairs, where the first component is the value, and the second component is the count. There are no 0 entries.
  2. Has two arguments: the collection of values, and a list of values-of-interest. Produces a histogram of values in the form of a list of counts, one per each entry in the list of values-of-interest argument. This is what's in the Essence paper, page 21, fig 4.
  3. Has two arguments: the collection of values, and a list of value-ranges-of-interest (in the form of tuples). Produces a histogram of values in the form of a list of counts, one per each entry in the list of value-ranges-of-interest.

Conjure (tries to) implement number 1 at the moment. I am tempted to provide 2&3 as well, since they can be useful (and to match the paper). I think I'll just overload the operator hist, since the behaviour is entirely dependent on the types of the parameters. More soon.