Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplicial complexes: add_face doesn't clear enough cached data #14354

Closed
jhpalmieri opened this issue Mar 25, 2013 · 6 comments
Closed

simplicial complexes: add_face doesn't clear enough cached data #14354

jhpalmieri opened this issue Mar 25, 2013 · 6 comments

Comments

@jhpalmieri
Copy link
Member

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.

CC: @tscrim

Component: algebraic topology

Author: John Palmieri

Reviewer: Travis Scrimshaw

Merged: sage-5.9.beta2

Issue created by migration from https://trac.sagemath.org/ticket/14354

@tscrim
Copy link
Collaborator

tscrim commented Mar 27, 2013

comment:4

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.

@jhpalmieri
Copy link
Member Author

comment:5

Good point, thanks. Fixed now.

@jhpalmieri
Copy link
Member Author

Attachment: trac_14354-simplicial.patch.gz

@tscrim
Copy link
Collaborator

tscrim commented Mar 27, 2013

comment:6

Thank you.

@tscrim
Copy link
Collaborator

tscrim commented Mar 27, 2013

Reviewer: Travis Scrimshaw

@jdemeyer
Copy link

Merged: sage-5.9.beta2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants