
On Fri, Aug 22, 2008 at 11:23 AM, Roberto Bagnara bagnara@cs.unipr.it wrote:
This also remained unanswered (I guess that, on the way back from holidays, you found zillions of messages pending... I know it is not an easy situation). If you can clarify the semantics of the comparison operation you need, we will add it to the library.
Cool, thanks.
/* Compares P1 to P2: returns 0 when the polyhedra don't overlap, returns 1 when p1 >= p2, and returns -1 when p1 < p2. The ">" relation is the "contains" relation. */
What should be returned if P1 and P2 do overlap and neither is contained into the other?
In that case, if p1 has constraints that are larger than p2, then 1, else -1.
i.e.
if p1 \ (p1 inter p2) is bigger than p2, then 1, else -1.
Concerning the sort function, we are not sure which place it could have in the PPL. The Pointset_Powerset domain is a set, so the ordering is an implementation detail that should not concern the client application. Moreover, a reduced Pointset_Powerset never contains two polyhedra one of which is contained into the other.
Could you return a "ppl_Polyhedron_t *" vector that contains pointers to the polyhedra in the set in that "topological order"?
Thanks, Sebastian