#10445: A Polyhedron should have a "is_simplicial" method.
---------------------------+------------------------------------------------
   Reporter:  jplabbe      |       Owner:  mhampton            
       Type:  enhancement  |      Status:  new                 
   Priority:  minor        |   Milestone:  sage-4.6.1          
  Component:  geometry     |    Keywords:  simplicial, polytope
     Author:               |    Upstream:  N/A                 
   Reviewer:               |      Merged:                      
Work_issues:               |  
---------------------------+------------------------------------------------

Comment(by mhampton):

 Oops, sorry, went a little too fast there.  Here's one that might actually
 work:
 {{{
 def is_simplicial(pq):
     """
     Tests if a polytope is simplicial, i.e. every facet is a simplex.

     EXAMPLES::

         sage: p = Polyhedron([[0,0,0],[1,0,0],[0,1,0],[0,0,1]])
         sage: p.is_simplicial()
         True
         sage: p2 = Polyhedron([[1, 1, 1], [-1, 1, 1], [1, -1, 1], [-1, -1,
 1], [1, 1, -1]])
         sage: p2.is_simplicial()
         False
     """
     for f in pq.facial_incidences():
         if len(f[1]) != pq.dim():
             return False
     return True
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10445#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to