#20718: Simplicial complexes: consistently order faces when computing chain
complexes, homology
-------------------------------------+-------------------------------------
       Reporter:  jhpalmieri         |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  minor              |    Milestone:  sage-7.3
      Component:  algebraic          |   Resolution:
  topology                           |    Merged in:
       Keywords:  days74             |    Reviewers:  Travis Scrimshaw
        Authors:  John Palmieri      |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  6bd5a97d9e9a6a752eccc8d566b50d7c85c9c50f
  u/jhpalmieri/homology_sorted       |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by jhpalmieri):

 I propose this change:
 {{{
 #!diff
 diff --git a/src/sage/homology/simplicial_complex.py
 b/src/sage/homology/simplicial_complex.py
 index c8a5bdd..db1b5f0 100644
 --- a/src/sage/homology/simplicial_complex.py
 +++ b/src/sage/homology/simplicial_complex.py
 @@ -991,10 +991,13 @@ class SimplicialComplex(Parent, GenericCellComplex):
              self._sorted = False
              return

 -        try:  # vertex_set is an iterable
 -            vertices = tuple(sorted(vertex_set))
 -        except TypeError:  # vertex_set is an integer
 -            vertices = tuple(range(vertex_set+1))
 +        if sort_facets:
 +            try:  # vertex_set is an iterable
 +                vertices = tuple(sorted(vertex_set))
 +            except TypeError:  # vertex_set is an integer
 +                vertices = tuple(range(vertex_set+1))
 +        else:
 +            vertices = tuple(vertex_set)
          gen_dict = {}
          for v in vertices:
              if name_check:
 }}}
 It really belongs on #20720, but that ticket is closed now. Open a new
 ticket and make this one a dependency of the new one, or do it here?

--
Ticket URL: <http://trac.sagemath.org/ticket/20718#comment:10>
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 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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to