RE: problem with constraints algorithm

>If this is the algorithm we want, it can be described in an abstract way that's independent of implementations:
>
>Given a set of candidate tracks Ti, and an ordered list of optional constraints Oj, let m(Ti,Oj)=1 if Ti matches Oj >and 0 otherwise.
>Let m(Ti)=the binary number formed by m(Ti,Oj) for all Oj.
>Select all Ti whose m(Ti) are the greatest (ties permitted).

At first glance, I think that's equivalent. So that's one valid implementation of the algorithm.

I was looking for a more declarative way to define the semantics of optional constraints. Unlike the mandatory constraints whose semantics can be easily conveyed in one English sentence or logic expression,
the semantics of the optional constraint is defined in a procedure. 

Thanks.
Li

Received on Friday, 20 July 2012 14:45:17 UTC