Opened 4 years ago

Closed 4 years ago

#14354 closed defect (fixed)

simplicial complexes: add_face doesn't clear enough cached data

Reported by: jhpalmieri Owned by: tbd
Priority: blocker Milestone: sage-5.9
Component: algebraic topology Keywords:
Cc: tscrim Merged in: sage-5.9.beta2
Authors: John Palmieri Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

Running add_face on a simplicial complex doesn't clear various data related to homology calculations:

sage: T = SimplicialComplex([range(1,5)]).n_skeleton(1)
sage: T.homology()
{0: 0, 1: Z x Z x Z}
sage: T.add_face([1,2,3])
sage: T.homology() # should be free of rank 2
{0: 0, 1: Z x Z x Z, 2: 0}
sage: SimplicialComplex(T.facets()).homology()
{0: 0, 1: Z x Z, 2: 0}

See also http://ask.sagemath.org/question/2391/homology-of-simplicial-complexes.

Attachments (1)

trac_14354-simplicial.patch (1.7 KB) - added by jhpalmieri 4 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 4 years ago by jhpalmieri

  • Status changed from new to needs_review

comment:2 Changed 4 years ago by jdemeyer

  • Component changed from PLEASE CHANGE to geometry

comment:3 Changed 4 years ago by jhpalmieri

  • Component changed from geometry to algebraic topology

comment:4 Changed 4 years ago by tscrim

Could you make self.__contractible = {} to self.__contractible = None to be consistent with the initial state (I also think this will result in a speedup for larger complexes since I think it will know to compute a large contractible subcomplex)? Other than that, I think this looks good. Thanks.

comment:5 Changed 4 years ago by jhpalmieri

Good point, thanks. Fixed now.

Changed 4 years ago by jhpalmieri

comment:6 Changed 4 years ago by tscrim

  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

Thank you.

comment:7 Changed 4 years ago by jdemeyer

  • Merged in set to sage-5.9.beta2
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.