You can call PPL directly, that'll reduce the overhead. See sage.libs.ppl


On Wednesday, February 11, 2015 at 11:37:35 AM UTC+1, Nathann Cohen wrote:
>
> Hello everybody,
>
> I am dealing with a problem for which I need to check quickly whether a 
> set of points is in convex position [1] in 2D and 3D. Sage seems to be able 
> to do that with the commands:
>
> sage: l = [(1,2),(3,4),(2,5)]
> sage: p = Polyhedron(l)
> sage: len(p.Vrepresentation()) == len(l)
> True
>
> This is, however, very very very very slow. I also suspect that the 
> creation of a Polyhedron object is far from being cheap.
>
> How do you guys think a quick "are_in_convex_position" function should be 
> written ? Which library should I call ? For 2D and 3D in particular ?
>
> Thanks,
>
> Nathann
>
> P.S.: My points have integer coordinates. I don't know if that matters.
>
> [1] A set of points is in convex position if none of them is in the convex 
> hull of the others.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to