Opened 10 years ago

Closed 10 years ago

#14354 closed defect (fixed)

simplicial complexes: add_face doesn't clear enough cached data

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

Status badges

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 John Palmieri 10 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 10 years ago by John Palmieri

Status: newneeds_review

comment:2 Changed 10 years ago by Jeroen Demeyer

Component: PLEASE CHANGEgeometry

comment:3 Changed 10 years ago by John Palmieri

Component: geometryalgebraic topology

comment:4 Changed 10 years ago by Travis Scrimshaw

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 10 years ago by John Palmieri

Good point, thanks. Fixed now.

Changed 10 years ago by John Palmieri

Attachment: trac_14354-simplicial.patch added

comment:6 Changed 10 years ago by Travis Scrimshaw

Reviewers: Travis Scrimshaw
Status: needs_reviewpositive_review

Thank you.

comment:7 Changed 10 years ago by Jeroen Demeyer

Merged in: sage-5.9.beta2
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.